A class for representing a Key i.e. it classifies trials as target or non-target trials.
Attr modelset: | list of the models into a ndarray of strings |
---|---|
Attr segset: | list of the test segments into a ndarray of strings |
Attr tar: | 2D ndarray of booleans which rows correspond to the models and columns to the test segments. True if target trial. |
Attr non: | 2D ndarray of booleans which rows correspond to the models and columns to the test segments. True is non-target trial. |
Removes some of the information in a key. Useful for creating a gender specific key from a pooled gender key. 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 ‘inkey’. |
Merges Key objects. This function takes as input a list of Key objects to merge in the curent one.
Parameters: | keyList – the list of Keys to merge |
---|
Reads information from a file and constructs a Key object. The type of file is deduced from the extension.
Parameters: | inputFileName – name of the file to read from |
---|
Read Key in PICKLE format.
Parameters: | inputFileName – name of the file to read from |
---|
Creates a Key object from information stored in a text file.
Parameters: | inputFileName – name of the file to read from |
---|
Save the Key object to file. The format of the file to create is set accordingly to the extension of the filename. This extension can be ‘.txt’ for text format and ‘.hdf5’ or ‘.h5’ for HDF5 format.
Parameters: | outputFileName – name of the file to write to |
---|
Save Key in PICKLE format
Parameters: | outputFilename – name of the file to write to |
---|
Save a Key object to a text file.
Parameters: | outputFileName – name of the output text file |
---|
Create a Ndx object based on the Key object
Returns: | a Ndx object based on the Key |
---|
Checks that an object of type Key obeys certain rules that must always be true.
Returns: | a boolean value indicating whether the object is valid. |
---|