[pymvpa] RFE & Permutation

Yaroslav Halchenko debian at onerussian.com
Thu Jan 28 02:20:14 UTC 2010


could you share more details about your data? number of labels/samples?
what error are you getting from cv (may be confusion matrix).

If your classifier manages actually to learn data then you can expect
null_prob be actually very very small, so everything depends on your
data and results.

we also might actually "fix" null_prob by accounting for correct
labeling as well which would then assure non-0 values for null_prob in
all cases...

> 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:

any modifications of sensitivities now could be absorbed into the provided
mapper which could be arbitrarily complex.  If it is a simple function to
perform per each feature, you just need to wrap it into FxMapper (just
see source of absolute_features).

absolute_features (as well as maxofabs_sample and sumofabs_sample) are just
convenience factories, so for instance sumofabs_sample

def sumofabs_sample():
    """Returns a mapper that returns the sum of absolute values of all samples.
    """
    return FxMapper('samples', lambda x: N.abs(x).sum())

is effectively what you need to replace combiner=FirstAxisMean,
transformer=N.abs -- it just would lack division by number of items
(sensitivities) but that would be irrelevant for ranking done by
FeatureSelector.

-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]





More information about the Pkg-ExpPsy-PyMVPA mailing list