[pymvpa] Bug in regression classifiers
Per B. Sederberg
persed at princeton.EDU
Sat Nov 8 23:55:14 UTC 2008
Just a follow-up. I have not solved the bug (and I'm not sure I can
because it's deep in Yarik/Michael code), but I have created a unit
test for it in test_clf.py:
testFeatureSelectionClassifierWithRegression
So, that's a place to start!
Thanks,
Per
At Sat, 8 Nov 2008 15:36:24 -0500,
Per B. Sederberg wrote:
>
> Hi Folks:
>
> I've sort of tracked down a bug in regression classifiers when used as
> part of a feature selection classifier wherein the code that saves the
> results as the values and then converts the results into predictions
> gets called twice, which means that the results (which are values for
> regressions) get turned into predictions and then copied to the
> values, so that there are no values left. You can get reproduce the
> error using this classifier:
>
> # define some classifiers
> anova_keep = 1000
> tokeep = 25
>
> # ANOVA feature selection
> anova_select = SensitivityBasedFeatureSelection(
> OneWayAnova(),
> FixedNElementTailSelector(anova_keep,mode='select',tail='upper'))
>
> # LARS classifier
> lars = LARS(trace=False, max_steps=tokeep)
> lars.states.enable('values')
> #lars.states.disable('trained_labels')
> anova_lars = FeatureSelectionClassifier(
> lars,
> anova_select,
> descr="LinSVM on %d(ANOVA)" % (tokeep))
> anova_lars.states.enable('values')
>
>
> I'm hoping someone knows a good way to fix this...
>
> Thanks,
> Per
More information about the Pkg-ExpPsy-PyMVPA
mailing list