[pymvpa] LinearCSVMC() error with python 2.7 but not 2.6?

Yaroslav Halchenko debian at onerussian.com
Fri Sep 7 01:53:44 UTC 2012


On Thu, 06 Sep 2012, Edmund Chong wrote:

>    Hi there,

>    I'm getting the following error when trying to train my classifier.
>    However, the exact same code works on one system but not another, and I
>    believe the key difference between the two systems is Python 2.6 (works)
>    vs Python 2.7 (does not work). 

could also be different backend used -- libsvm vs sg... if you have
libsvm built fine that it should be used by default, otherwise 

In [9]: issubclass(LinearCSVMC, sg.SVM)
Out[9]: True


>    � File "analyse_beta.py", line 106, in <module>
>    ��� cv_results1 = cvte(fds1) #run the cross validation + monte carlo,

could you share complete snippet of your code and the dataset (check --
may be it fails also with  a small portion of it, e.g. fds1[:, :10]).
you can easily share it by saving via h5save


also what is the output of 

mvpa2.wtf() # where fails

?  btw -- by comparing outputs of wtf() on two differing boxes you might
discover more reasons to differ ;)

>    ��� dist_samples_rs = dist_samples.reshape((shape[0], -1))
>    ValueError: total size of new array must be unchanged

another thing you could if that was under ipython,
enable debug mode by entering

pdb

so it would jump into pdb whenever failure occurs... and then share output of

print dist_samples.shape
print shape

;)
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



More information about the Pkg-ExpPsy-PyMVPA mailing list