[pymvpa] shogun 6.6/pymvpa bug
Yaroslav Halchenko
debian at onerussian.com
Mon Nov 3 15:31:05 UTC 2008
Hi Scott,
Thanks for the report... I hadn't tried recent SG thus I didn't hit it but
indeed it seems SG team introduced non-backward compatible changes without
properly announcing (ie really screaming out loud ;-)) it nor by
signaling about that in the version change (afaik change of minor in the
version should be backward compatible). heh heh
All those changes originate from a new feature in SG -- various kernel
normalization strategies which is a great feature to have but once again --
such changes make it really inconvenient for us users to stay compatible with
various versions of shogun.
Here is a snippet from the change in example (rev 3359 change) from
shogun python-modular which reveals what they want us to do:
- kernel=LinearKernel(feats_train, feats_train, scale)
+ kernel=LinearKernel()
+ kernel.set_normalizer(AvgDiagKernelNormalizer(scale))
+ kernel.init(feats_train, feats_train)
I will ask SG team if they would be kind to introduce compatibility patch,
otherwise we will need to create custom handling for different versions of
shogun (which I would prefer to avoid)
I will keep you updated
Cheers
Yarik
On Sat, 01 Nov 2008, Scott Gorlin wrote:
> Hi,
> I just upgraded my system, and after reinstalling some packages, noticed
> a few bugs. Pymvpa does not seem to work with the latest release of
> Shogun 0.6.6.
> Running clfs_examples gives the following output then error:
> Dummy 2-class univariate with 2 useful features out of 100
> Dataset / float64 60 x 100
> uniq: 2 labels 6 chunks labels_mapped
> stats: mean=0.00195773 std=0.213342 var=0.0455148 min=-0.752662 max=1
> Counts of labels in each chunk:
> chunks\labels 0 1
> --- ---
> 0 5 5
> 1 5 5
> 2 5 5
> 3 5 5
> 4 5 5
> 5 5 5
> Original labels were mapped using following mapping:
> L0: 0
> L1: 1
> Summary per label across chunks
> label mean std min max #chunks
> 0 5 0 5 5 6
> 1 5 0 5 5 6
> Summary per chunk across labels
> chunk mean std min max #labels
> 0 5 0 5 5 2
> 1 5 0 5 5 2
> 2 5 0 5 5 2
> 3 5 0 5 5 2
> 4 5 0 5 5 2
> 5 5 0 5 5 2
> Classifier %corr #features train
> predict full
> SMLR(lm=0.1) : 85.0% 22 0.07s
> 0.00s 0.43s
> SMLR(lm=1.0) : 91.7% 10 0.00s
> 0.00s 0.04s
> Pairs+maxvote multiclass on SMLR(lm=0.1): 85.0% 100 0.08s
> 0.00s 0.48s
> libsvm.LinSVM(C=def) : 78.3% 100 0.01s
> 0.00s 0.10s
> libsvm.LinSVM(C=10*def) : 81.7% 100 0.01s
> 0.00s 0.11s
> libsvm.LinSVM(C=1) : 81.7% 100 0.01s
> 0.00s 0.11s
> libsvm.LinNuSVM(nu=def) : 78.3% 100 0.01s
> 0.00s 0.11s
> libsvm.RbfSVM() : 75.0% 100 0.01s
> 0.00s 0.08s
> libsvm.RbfNuSVM(nu=def) : 78.3% 100 0.01s
> 0.00s 0.08s
> libsvm.PolySVM() : 75.0% 100 0.01s
> 0.00s 0.10s
> sg.LinSVM(C=def)/libsvm :
> Traceback (most recent call last):
> File "clfs_examples.py", line 90, in <module>
> main()
> File "clfs_examples.py", line 71, in main
> clf.train(training_ds)
> File "/usr/lib/python2.5/site-packages/mvpa/clfs/base.py", line 375,
> in train
> result = self._train(dataset)
> File "/usr/lib/python2.5/site-packages/mvpa/clfs/sg/svm.py", line 287,
> in _train
> *kargs)
> File "/usr/local/lib/python2.5/site-packages/shogun/Kernel.py", line
> 1303, in __init__
> this = _Kernel.new_LinearKernel(*args)
> NotImplementedError: Wrong number of arguments for overloaded function
> 'new_LinearKernel'.
> Possible C/C++ prototypes are:
> CLinearKernel()
> CLinearKernel(CRealFeatures *,CRealFeatures *)
> I placed the crossvalidation step in a try block, and noticed that most
> of the shogun classes in clfs_examples failed. The exceptions (which
> did work) called sg.SomeClass() without any arguments, leading me to
> believe there is some weird API change in shogun. All of the examples
> in Shogun's python-modular tests work just fine.
> After I reinstalled Shogun 0.6.4, everything worked fine. Then I
> reinstalled 0.6.6, and it didn't work again.
> I am running Ubuntu 8.10 in python 2.5 with pymvpa 0.3.1.
> Thanks!
> Scott
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
--
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student Ph.D. @ CS Dept. NJIT
Office: (973) 353-1412 | FWD: 82823 | Fax: (973) 353-1171
101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list