src.utils.util.filter_stimulus_by_class

filter_stimulus_by_class(all_data, data_subset, class_ignore_list, label_level)[source]

Filter data by output class label.

Parameters
  • all_data – Dictionary of numpy arrays which contains all data.

  • data_subset – A string value that denotes the train/test subset. Can only be “train” or “test”.

  • class_ignore_list – A list of class labels to ignore.

  • label_level – An integer that denotes the label hierarchy level. Lies between [0,3].

Returns

A numpy array with boolean indices corresponding to output class labels.

Return type

np.ndarray

Raises

ValueError – If label_level does not lie between [0, 3].

Return type

ndarray