Sounds great!!<div><br></div><div>Thank you Yaroslav!</div><div><br></div><div>Roberto.<br><br><div class="gmail_quote">On 3 October 2011 19:38, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com">debian@onerussian.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">AHA -- that is a "cool" one ;) if only we refactored those selectors<br>
into proper Node's, they could have been chained :-/ now you could<br>
chain (afaik) the corresponding SensitivityBasedFeatureSelection's (or<br>
just use CombinedFeatureSelection), but that would be wasteful<br>
since it would compute ANOVA twice... also we could take advantage that<br>
feature selectors are simple callables so we could craft a corresponding<br>
funct(ion|tor) which would chain those two:<br>
<br>
def custom_tail_selector(seq):<br>
seq1 = FractionTailSelector(0.01, mode='discard', tail='upper')(seq)<br>
seq2 = FractionTailSelector(0.05, mode='select', tail='upper')(seq)<br>
return list(set(seq1).intersection(seq2))<br>
<br>
it seems to work as desired (pushed a rudimentary smoke unittest for it)<br>
<div class="im"><br>
On Mon, 03 Oct 2011, Roberto Guidotti wrote:<br>
<br>
</div><div class="im">> Thank you for the response,<br>
<br>
> I'm always lazy to improve problem description (and my english doesn't<br>
> help me!!!)<br>
<br>
> Theoretically for every fold I have to select important features, so I<br>
> perform ANOVA, the algorithm ranks my feature, but I want to drop the<br>
> first 1% and use the 5% (or X%) of the new rank after 1% dropping. I<br>
> found on my analysis that most important feature are, in the 90% of<br>
> cases, on the brain edge (probably motion artefacts voxels that still<br>
> affect the dataset also after preprocessing).<br>
<br>
> For this reason I would like to extract ANOVA ranking stack or to find<br>
> a method to use voxels from 1.01% to 5.01%!<br>
<br>
> So I want to perform ANOVA on data, drop the first 1%, select the new<br>
> ranking stack (5% of residual voxels) and train the classifier!<br>
<br>
> Thank you<br>
<br>
> RG<br>
<br>
</div>> On 3 October 2011 18:14, Yaroslav Halchenko <[1]<a href="mailto:debian@onerussian.com">debian@onerussian.com</a>><br>
<div><div></div><div class="h5">> wrote:<br>
<br>
> I might be missing the problem since you seem to have to know the<br>
> blocks<br>
> you need ;) so following the example from the clfs warehouse:<br>
> FeatureSelectionClassifier(<br>
> kNN(),<br>
> SensitivityBasedFeatureSelection(<br>
> OneWayAnova(),<br>
> FractionTailSelector(0.05, mode='select', tail='upper')),<br>
> descr="kNN on 5%(ANOVA)")<br>
> logical change would be to use 0.99 instead of 0.05 to select 99%<br>
> top voxels<br>
> (or in other words to dump 1%)... or just change mode to 'discard'<br>
> and specify<br>
> 0.01 as the fraction<br>
<br>
> On Mon, 03 Oct 2011, Roberto Guidotti wrote:<br>
> > Hi all,<br>
> > I would like to know if there is a method to extract the feature<br>
> > ranking from ANOVA feature selection or if there is a method to<br>
> drop<br>
> > first 1% of voxel included in the ranking and select other voxel<br>
> as<br>
> > usual (with FractionTailSelection()).<br>
> > Thank you<br>
> > Roberto<br>
<br>
> > _______________________________________________<br>
> > Pkg-ExpPsy-PyMVPA mailing list<br>
</div></div>> > [2]<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<br>
> [3]<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-expps" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-expps</a><br>
<div><div></div><div class="h5">> y-pymvpa<br>
--<br>
=------------------------------------------------------------------=<br>
Keep in touch <a href="http://www.onerussian.com" target="_blank">www.onerussian.com</a><br>
Yaroslav Halchenko <a href="http://www.ohloh.net/accounts/yarikoptic" target="_blank">www.ohloh.net/accounts/yarikoptic</a><br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br></div>