Hi Oliver,

Thanks, that works! Sorry for the dummy questions.

Cheers and thanks again,

Mathias


On Sat, Jan 28, 2012 at 12:38 PM, Olivier Grisel
<[email protected]>wrote:

> 2012/1/28 Mathias Verbeke <[email protected]>:
> > Hi Gael,
> >
> > Thanks for your quick answer. Your solution solved the error, but now I
> get
> > this:
> >
> > Traceback (most recent call last):
> >   File "./svm_sklearn.py", line 43, in <module>
> >     train(training_set_file_name, model_file_name)
> >   File "./svm_sklearn.py", line 17, in train
> >     clf.fit(X_train, y_train)
> >   File
> >
> "/home/mathiasv/lib/python2.6/site-packages/scikit_learn-0.10-py2.6-linux-x86_64.egg/sklearn/svm/base.py",
> > line 175, in fit
> >     X = np.asarray(X, dtype=np.float64, order='C')
> >   File "/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line
> 230,
> > in asarray
> >     return array(a, dtype, copy=False, order=order)
> > ValueError: setting an array element with a sequence.
> >
> > Would you have any idea how this is caused?
>
> This is because you are applying the dense SVC class to a sparse input
> set. Use sklearn.svm.sparse.SVC instead. Or clone the master where
> both classes have recently been merged into one.
>
> --
> Olivier
> http://twitter.com/ogrisel - http://github.com/ogrisel
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to