[pymvpa] RFE
Kimberly Zhou
kyqzhou at gmail.com
Thu Jun 16 20:02:24 UTC 2011
Thanks so much for the reply! I took a look at the unit tests at
http://nullege.com/codes/show/src%40p%40y%40PyMVPA-HEAD%40mvpa%40tests%40test_rfe.py/20/mvpa.featsel.rfe.RFE/python.
and the line (352) with SplitClassifier has been commented out...does that
mean for 0.6.x versions of PyMVPA, SplitClassifier is no longer needed?
Please let me know if I've got this wrong...
In the 0.6.x. version:
1. RFE uses sensitivies from the classifier to select features
2. meta-classifier FeatureSelectionClassifier trains an untrained version of
the classifier on the selected features
3. CrossValidation uses that trained classifier on data partitioned by
NFoldPartitioner (I have 6 runs/chunks, it splits one chunk out each time?)
Thus we don't need SplitClassifier anymore?
Also, is it correct that I put Splitter('chunks')? i.e. in line 6:
fs = \
RFE(rfesvm_split.get_sensitivity_analyzer(),
ProxyMeasure(
rfesvm_split,
postproc=BinaryFxNode(mean_mismatch_error, 'targets')),
Splitter('chunks'),
fselector=FractionTailSelector(
percent / 100.0,
mode='select', tail='upper'),
update_sensitivity=True)
Still trying my best to get everything right! Thanks again for your time. :)
Any input will be very much appreciated!
Kimberly
-----Original Message-----
From: Yaroslav Halchenko [mailto:debian at onerussian.com]
Sent: Tuesday, June 14, 2011 5:34 PM
To: Development and support pf PyMVPA
Subject: Re: [pymvpa] RFE confusion_state
sorry... didn't have change to look in detail -- I guess that doc page
of ours got outdated since it reflects how you would do RFE using 0.4.x
version of PyMVPA. So you could do it that way if you used 0.4.7.
Sorry about the confusion.
For 0.6.x -- here is an example from our unittests which I hope would be of
help help. It does pretty much the same ;-)
def test_james_problem(self):
percent = 80
dataset = datasets['uni2small']
rfesvm_split = LinearCSVMC()
fs = \
RFE(rfesvm_split.get_
sensitivity_analyzer(),
ProxyMeasure(rfesvm_split,
postproc=BinaryFxNode(mean_mismatch_error,
'targets')),
Splitter('train'),
fselector=FractionTailSelector(
percent / 100.0,
mode='select', tail='upper'), update_sensitivity=True)
clf = FeatureSelectionClassifier(
LinearCSVMC(),
# on features selected via RFE
fs)
# update sensitivity at each step (since we're not using the
# same CLF as sensitivity analyzer)
cv = CrossValidation(clf, NFoldPartitioner(), postproc=mean_sample(),
enable_ca=['confusion'])
if you want to see the progress of RFE -- just enable debug variables
RFEC and RFEC_ for more verbosity... eg. in the environment
export MVPA_DEBUG=RFEC,RFEC_
before running your python script
On Tue, 14 Jun 2011, Kimberly Zhou wrote:
> Hi all,
> I'm still trying to get recursive feature selection to work with the
> example from
> [1]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:
--
=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20110616/396ce524/attachment-0001.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list