On Aug 18, 2014, at 2:42 AM, cfygj <[email protected]> wrote:
> In my script, I have set " ds = remove_invariant_features(ds)". I think this
> setting has replaced those [that have NaN value] voxels with zeros.
Those features are not invariant.
from mvpa2.suite import *
from numpy import NaN, Inf
ds=Dataset([[1,1,NaN,Inf],[1,0,NaN,Inf]])
dsc=remove_invariant_features(ds)
In [7]: dsc
Out[7]:
Dataset(array([[ 1., nan, inf],
[ 0., nan, inf]]), sa=SampleAttributesCollection(items=[]),
fa=FeatureAttributesCollection(items=[]),
a=DatasetAttributesCollection(items=[]))
I've created a PR that introduces remove_nonfinite_features:
https://github.com/PyMVPA/PyMVPA/pull/236. Note that it does not remove
invariant features.
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa