@@ -126,7 +126,7 @@ Let's start:
126
126
>> > weights = ndl.ndl(events = ' docs/data/lexample.tab.gz' , alpha = 0.1 ,
127
127
... betas = (0.1 , 0.1 ), method = ' threading' )
128
128
>> > weights # doctest: +ELLIPSIS
129
- < xarray.DataArray (outcomes: 8 , cues: 15 )>
129
+ < xarray.DataArray (outcomes: 8 , cues: 15 )> ...
130
130
...
131
131
132
132
``weights `` is an ``xarray.DataArray `` of dimension ``len(outcomes) ``,
@@ -139,21 +139,21 @@ methods
139
139
.. code-block :: python
140
140
141
141
>> > weights[1 , 5 ] # doctest: +ELLIPSIS
142
- < xarray.DataArray ()>
142
+ < xarray.DataArray ()> ...
143
143
...
144
144
>> > weights.loc[{' outcomes' : ' plural' , ' cues' : ' s#' }] # doctest: +ELLIPSIS
145
- < xarray.DataArray ()>
145
+ < xarray.DataArray ()> ...
146
146
array(0.076988 ... )
147
147
Coordinates:
148
- outcomes < U6 ' plural'
149
- cues < U2 ' s#'
148
+ outcomes < U6 ... ' plural'
149
+ cues < U2 ... ' s#'
150
150
...
151
151
>> > weights.loc[' plural' ].loc[' s#' ] # doctest: +ELLIPSIS
152
- < xarray.DataArray ()>
152
+ < xarray.DataArray ()> ...
153
153
array(0.076988 ... )
154
154
Coordinates:
155
- outcomes < U6 ' plural'
156
- cues < U2 ' s#'
155
+ outcomes < U6 ... ' plural'
156
+ cues < U2 ... ' s#'
157
157
...
158
158
159
159
return the weight of the cue 's#' (the unigram 's' being the word-final) for
@@ -168,13 +168,13 @@ weight matrix by specifying the ``weight`` argument:
168
168
>> > weights2 = ndl.ndl(events = ' docs/data/lexample.tab.gz' , alpha = 0.1 ,
169
169
... betas = (0.1 , 0.1 ), method = ' threading' , weights = weights)
170
170
>> > weights2 # doctest: +ELLIPSIS
171
- < xarray.DataArray (outcomes: 8 , cues: 15 )>
171
+ < xarray.DataArray (outcomes: 8 , cues: 15 )> ...
172
172
array([[ 0.24 ...
173
173
...
174
174
... ]])
175
175
Coordinates:
176
- * outcomes (outcomes) < U6 ' hand' ' plural' ...
177
- * cues (cues) < U2 ' #h' ' ha' ' an' ' nd' ...
176
+ * outcomes (outcomes) < U6 ... ' hand' ' plural' ...
177
+ * cues (cues) < U2 ... ' #h' ' ha' ' an' ' nd' ...
178
178
Attributes:...
179
179
date:...
180
180
event_path:...
@@ -235,7 +235,7 @@ If you prefer to get a ``xarray.DataArray`` returned you can set the flag ``make
235
235
... alphas = alphas_cues, betas = (0.1 , 0.1 ),
236
236
... make_data_array = True )
237
237
>> > weights # doctest: +ELLIPSIS
238
- < xarray.DataArray (outcomes: 8 , cues: 15 )>
238
+ < xarray.DataArray (outcomes: 8 , cues: 15 )> ...
239
239
...
240
240
241
241
@@ -449,27 +449,27 @@ gets apparent.
449
449
... ' cue_vector_dimensions' : [' dim1' , ' dim2' , ' dim3' ]}]
450
450
>> > weights_ndl = weights_ndl.loc[{' outcomes' : [' A' , ' B' , ' C' , ' D' ], ' cues' : [' a' , ' b' , ' c' ]}]
451
451
>> > print (weights_wh) # doctest: +ELLIPSIS
452
- < xarray.DataArray (outcome_vector_dimensions: 4 , cue_vector_dimensions: 3 )>
452
+ < xarray.DataArray (outcome_vector_dimensions: 4 , cue_vector_dimensions: 3 )> ...
453
453
array([[0.06706 ... , 0 . , 0 . ],
454
454
[0 . , 0.03940 ... , 0 . ],
455
455
[0.0094 ... , 0 . , 0.03940 ... ],
456
456
[0.01 , 0 . , 0 . ]])
457
457
Coordinates:
458
- * outcome_vector_dimensions (outcome_vector_dimensions) < U4 ' dim1' ... ' dim4 '
459
- * cue_vector_dimensions (cue_vector_dimensions) < U4 ' dim1' ' dim2 ' ' dim3 '
460
- outcomes < U1 ' A'
461
- cues < U1 ' a'
458
+ * outcome_vector_dimensions (outcome_vector_dimensions) < U4 ... ' dim1' ...
459
+ * cue_vector_dimensions (cue_vector_dimensions) < U4 ... ' dim1' ...
460
+ outcomes < U1 ... ' A'
461
+ cues < U1 ... ' a'
462
462
Attributes: (12 / 15 )
463
463
...
464
464
>> > print (weights_ndl) # doctest: +ELLIPSIS
465
- < xarray.DataArray (outcomes: 4 , cues: 3 )>
465
+ < xarray.DataArray (outcomes: 4 , cues: 3 )> ...
466
466
array([[0.06706 ... , 0 . , 0 . ],
467
467
[0 . , 0.03940 ... , 0 . ],
468
468
[0.0094 ... , 0 . , 0.03940 ... ],
469
469
[0.01 , 0 . , 0 . ]])
470
470
Coordinates:
471
- * outcomes (outcomes) < U1 ' A' ' B' ' C' ' D'
472
- * cues (cues) < U1 ' a' ' b' ' c'
471
+ * outcomes (outcomes) < U1 ... ' A' ' B' ' C' ' D'
472
+ * cues (cues) < U1 ... ' a' ' b' ' c'
473
473
Attributes: (12 / 17 )
474
474
...
475
475
0 commit comments