[pymvpa] RFE confusion_state
Kimberly Zhou
kyqzhou at gmail.com
Tue Jun 14 21:08:10 UTC 2011
Hi all,
I'm still trying to get recursive feature selection to work with the example
from http://dev.pymvpa.org/featsel.html#recursive-feature-elimination,
however I can't get past an error from the line with confusion_state=
"confusion".
Here's the code:
rfesvm_split = SplitClassifier(LinearCSVMC())
rfeclf = \
FeatureSelectionClassifier(
clf = LinearCSVMC(),
feature_selection = RFE(
sensitivity_analyzer = rfesvm_split.get_sensitivity_analyzer(),
transfer_error = ConfusionBasedError(
rfesvm_split,
confusion_state="confusion"),
feature_selector = FractionTailSelector(
0.2, mode='discard', tail='lower'),
update_sensitivity=True),
enable_states=['feature_ids'],
descr='LinSVM+RFE(splits_avg)')
The error:
Traceback (most recent call last):
File "<stdin>", line 8, in <module>
File "/usr/lib/pymodules/python2.6/mvpa/clfs/transerror.py", line 1500, in
__init__
(confusion_state, clf)
ValueError: Conditional attribute confusion is not defined for classifier
SplitClassifier(combiner=None, space='targets')
"confusion" is the ID of the conditional attribute that stores
ConfusionMatrix, but since confusion matrix isn't computed until data is
acquired (as stated from
http://pymvpa.org/generated/mvpa.clfs.transerror.ConfusionMatrix.html#mvpa-clfs-transerror-confusionmatrix),
am I missing something before this code that I should have and that is why
it gives that error?
Or must I enable the conditional attribute confusion in some way before
this?
I would really appreciate any Ideas or input as we are pretty stuck at this
point...
and of course, thanks in advance for any replies!
Kimberly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20110614/58051768/attachment-0001.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list