[pymvpa] RFE & Permutation
Matthias Ekman
Matthias.Ekman at nf.mpg.de
Wed Jan 27 23:44:53 UTC 2010
Dear PyMVPA experts,
I tried to set up a RFE-Analysis with Permutationtest. But this results
in (implausible) low p-values. I guess there is smth. wrong with my code
(working with PyMVPA 0.4.3 and Linux)?
rfe_clf = LinearCSVMC(C=1)
rfesvm_split = SplitClassifier(rfe_clf)
clf = \
FeatureSelectionClassifier(
clf = LinearCSVMC(C=1),
feature_selection = RFE(
sensitivity_analyzer=rfesvm_split.getSensitivityAnalyzer(combiner=FirstAxisMean,
transformer=N.abs),
transfer_error=ConfusionBasedError(
rfesvm_split,
confusion_state="confusion"),
stopping_criterion=FixedErrorThresholdStopCrit(0.20),
feature_selector=FractionTailSelector(
0.2, mode='discard', tail='lower'),
update_sensitivity=True))
splitter = NFoldSplitter(cvtype=1)
NO_PERMUTATIONS=1000
cv = CrossValidatedTransferError(
TransferError(clf),
splitter, null_dist=MCNullDist(permutations=NO_PERMUTATIONS,tail='left'),
enable_states=['confusion'])
Btw, how should this line look like for upcoming version 0.5.0?:
sensitivity_analyzer=rfesvm_split.getSensitivityAnalyzer(combiner=FirstAxisMean,
transformer=N.abs
I guess "transformer=N.abs" becomes "mapper=absolute_features()", but
what about the combiner? I am getting a TypeError here:
TypeError: Unexpected keyword argument combiner=<function FirstAxisMean
at 0x1929de8> for BoostedClassifierSensitivityAnalyzer: 4
states:states{base_sensitivities raw_results null_t null_prob+}. Valid
parameters are ['base_sensitivities', 'raw_results', 'null_t', 'null_prob']
Thanks in advance!
Matthias
More information about the Pkg-ExpPsy-PyMVPA
mailing list