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

Edmund Chong edmund.w.chong at gmail.com
Thu Sep 6 21:17:45 UTC 2012

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). And just like a previous poster reported (
the error comes with using LinearCSVMC() as my classifier and goes away
when I used LinearNuSVMC() instead.

WARNING: Failed to obtain value from <CrossValidation> due to in method
'svm_parameter_C_set', argument 2 of type 'double'.  Measurement was
skipped, which could lead to unstable and/or incorrect assessment of the
Traceback (most recent call last):
  File "analyse_beta.py", line 106, in <module>
    cv_results1 = cvte(fds1) #run the cross validation + monte carlo,
  File "/usr/lib/pymodules/python2.7/mvpa2/base/learner.py", line 235, in
    return super(Learner, self).__call__(ds)
  File "/usr/lib/pymodules/python2.7/mvpa2/base/node.py", line 83, in
  File "/usr/lib/pymodules/python2.7/mvpa2/measures/base.py", line 118, in
    self.__null_dist.fit(measure, ds)
  File "/usr/lib/pymodules/python2.7/mvpa2/clfs/stats.py", line 420, in fit
    dist_samples_rs = dist_samples.reshape((shape[0], -1))
ValueError: total size of new array must be unchanged

Any workaround for this? :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20120906/6d43f7ff/attachment.html>

More information about the Pkg-ExpPsy-PyMVPA mailing list