[pymvpa] Hyperalignment error: "For now do not handle invariant in time datasets"

Chang Wenshuo mystery.jazz at hotmail.com
Sun Nov 4 13:38:41 GMT 2018


Dear all,

I am running hyperalignment between-subject analysis. Before calling Hyperalignment(), I stacked the

datasets across the subjects with all runs and did Anova-based feature selection. Hyperalignment() fails

for the dataset with the error message: "For now do not handle invariant in time datasets".


It would be great if somebody has any kind of information about what causes this issue, and ways to

solve it. The problem is not fixed after I removed invariant features by using remove_invariant_features()

or set the svd in ProcrusteanMapper() to 'dgesvd'.


My codes are as follow:

# split in training and testing sets
ds_train = dscon[np.array([r != test_run for r in dscon.sa.chunks], dtype='bool'),:]
ds_test = dscon[np.array([r == test_run for r in dscon.sa.chunks], dtype='bool'),:]
ds_train = remove_invariant_features(ds_train)

# manual feature selection for every individual dataset in the list
anova = OneWayAnova(space='reg')
fscores = [anova(sd) for sd in ds_train]
eatsels = [StaticFeatureSelection(feature_selector(fscore)) for fscore in fscores]
ds_train_fs = [fs.forward(sd) for fs, sd in zip(featsels, ds_train)]

# Perform hyperalignment on the training data
hyper = Hyperalignment(alignment=ProcrusteanMapper(sspace='reg'))
hypmaps = hyper(ds_train_fs)


The error message is:

Traceback (most recent call last):

  File "<ipython-input-377-74fee538844a>", line 2, in <module>
    hypmaps = hyper(ds_train_fs)

  File "/usr/local/Anaconda/lib/python2.7/site-packages/mvpa2/algorithms/hyperalignment.py", line 339, in __call__
    self.train(datasets)

  File "/usr/local/Anaconda/lib/python2.7/site-packages/mvpa2/algorithms/hyperalignment.py", line 313, in train
    residuals)

  File "/usr/local/Anaconda/lib/python2.7/site-packages/mvpa2/algorithms/hyperalignment.py", line 419, in _level1
    m.train(ds_new)

  File "/usr/local/Anaconda/lib/python2.7/site-packages/mvpa2/base/learner.py", line 137, in train
    self._train(ds)

  File "/usr/local/Anaconda/lib/python2.7/site-packages/mvpa2/mappers/procrustean.py", line 123, in _train
    raise ValueError, "For now do not handle invariant in time datasets"

ValueError: For now do not handle invariant in time datasets





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-exppsy-pymvpa/attachments/20181104/a82e7b01/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list