Slicers¶
- class sekupy.preprocessing.slicers.FeatureExpressionSlicer(fx=<ufunc 'greater'>)[source]¶
- transform(ds)[source]¶
[summary]
- Parameters:
ds (pymvpa dataset) – The dataset to be used
value (int or fx, optional) – The function used to generate a value to be compared with the attribute using the compare_fx funtion, by default lambdax:np.mean(x)+1.5*np.std(x)
- Returns:
ds – The sliced dataset
- Return type:
pymvpa dataset
- class sekupy.preprocessing.slicers.FeatureSlicer(**kwargs)[source]¶
This transformer filters the dataset using features as specified on a dictionary The dictionary indicates the feature attributes to be used as key and a list with conditions to be selected:
- selection_dict = {
‘accuracy’: [‘I’], ‘frame’:[1,2,3] }
This dictionary means that we will select all features with frame attribute equal to 1 OR 2 OR 3 AND all samples with accuracy equal to ‘I’.
- class sekupy.preprocessing.slicers.SampleExpressionSlicer(attr, compare_fx=<ufunc 'greater'>, attr_transformer=None)[source]¶
- transform(ds, value=<function SampleExpressionSlicer.<lambda>>)[source]¶
[summary]
- Parameters:
ds (pymvpa dataset) – The dataset to be used
value (int or fx, optional) – The function used to generate a value to be compared with the attribute using the compare_fx funtion, by default lambdax:np.mean(x)+1.5*np.std(x)
- Returns:
ds – The sliced dataset
- Return type:
pymvpa dataset
- class sekupy.preprocessing.slicers.SampleSlicer(**kwargs)[source]¶
Selects only portions of the dataset based on a dictionary The dictionary indicates the sample attributes to be used as key and a list with conditions to be selected:
- selection_dict = {
‘frame’: [1,2,3] }
This dictionary means that we will select all samples with frame attribute equal to 1 OR 2 OR 3 AND all samples with accuracy equal to ‘I’.