A class that encodes trial index information. It has a list of model names and a list of test segment names and a matrix indicating which combinations of model and test segment are trials of interest.
Attr modelset: | list of unique models in a ndarray |
---|---|
Attr segset: | list of unique test segments in a ndarray |
Attr trialmask: | 2D ndarray of boolean. Rows correspond to the models and columns to the test segments. True if the trial is of interest. |
Clean the Ndx by removing missing models and segments
Parameters: |
|
---|
Removes some of the information in an Ndx. Useful for creating a gender specific Ndx from a pooled gender Ndx. Depending on the value of ‘keep’, the two input lists indicate the strings to retain or the strings to discard.
Parameters: |
|
---|---|
Returns: | a filtered version of the current Ndx object. |
Merges a list of Ndx objects into the current one. The resulting ndx must have all models and segment in the input ndxs (only once). A trial in any ndx becomes a trial in the output ndx
Parameters: | ndxList – list of Ndx objects to merge |
---|
Reads information from a file and constructs an Ndx object. The type of file is deduced from the extension. The extension must be ‘.txt’ for a text file and ‘.hdf5’ or ‘.h5’ for a HDF5 file.
Parameters: | inputFileName – name of the file to read from |
---|
Read Ndx in PICKLE format.
Parameters: | inputFileName – name of the file to read from |
---|
Creates an Ndx object from information stored in a text file.
Parameters: | inputFileName – name of the file to read from |
---|
Save the Ndx object to file. The format of the file is deduced from the extension of the filename. The format can be PICKLE, HDF5 or text. Extension for pickle should be ‘.p’, text file should be ‘.txt’ and for HDF5 it should be ‘.hdf5’ or ‘.h5’
Parameters: | outputFileName – name of the file to write to |
---|
Save Ndx in PICKLE format
Parameters: | outputFilename – name of the file to write to |
---|
Save a Ndx object in a text file
Parameters: | outputFileName – name of the file to write to |
---|
Checks that an object of type Ndx obeys certain rules that % must always be true.
Returns: | a boolean value indicating whether the object is valid |
---|