Hello everyone,
I am doing classification with the nilearn.decoding.Decoder() function,
cv_motor = LeaveOneGroupOut()
decoder_motor = Decoder(estimator='svc', mask=mask_img, cv=cv_motor, screening_percentile = 20, standardize='zscore_sample', scoring='accuracy')
decoder.fit(X_train, y_train, groups=groups)
I wish to apply feature selection for the decoder, to select those voxels within ROI masks (mean voxel n = 800) with higher scores. The argument “screening_percentile” here is “corrected according to volume of mask, relative to the volume of standard brain”, which should take the mask into account and take the set percentile within the mask.
Between screening_percentile = 20 and screening_percentile = 1, I got the same decoder.coef_.shape with the same amount of decoder.coef_ which is not zero, with the values changed minorly only after decimal points.
I tried to find other function to do this feature selection, e.g., sklearn.feature_selection.SelectPercentile.
I need to do the classification while applying:
- ROI mask (I can do this before fitting the decoder)
- LeaveOneGroupOut() cross-validation (I have 6 groups; one image for each condition (n=2) per group)
- z-score standardization
- feature selection based on either 20 percentile of the feature or 150 voxels for example
Question:
- A. How can I check the difference between different screening_percentile with Decoder()?
- B. Does “apply feature selection for the decoder to select those voxels within ROI masks with higher scores” sound a reasonable procedure?
- C. Is there any way to code with a different function other than Decoder() while applying the needs stated above (1-4)? Or how can I apply something similar to .SelectPercentile() function after defining the decoder with Decoder()?
Any idea or suggestion please?
Many thanks.