Hi all,
Yet another question: now I want to do some plotting, for which I used the
code from
http://scikit-learn.org/stable/auto_examples/svm/plot_separating_hyperplane.html#example-svm-plot-separating-hyperplane-py
but I get the following error:
Traceback (most recent call last):
File "./svm_sklearn.py", line 82, in <module>
test(test_file_name, model_file_name, output_file_name)
File "./svm_sklearn.py", line 42, in test
plot(clf, X_test, y_test)
File "./svm_sklearn.py", line 52, in plot
a = -w[0] / w[1]
File "/usr/lib/python2.6/dist-packages/scipy/sparse/csr.py", line 260, in
__getitem__
return self[key,:] #[i] or [1:2]
File "/usr/lib/python2.6/dist-packages/scipy/sparse/csr.py", line 221, in
__getitem__
return self._get_row_slice(row, col) #[i,1:2]
File "/usr/lib/python2.6/dist-packages/scipy/sparse/csr.py", line 299, in
_get_row_slice
raise IndexError('index (%d) out of range' % i )
IndexError: index (1) out of range
Could this have something to do with the sparse vectors?
Thanks,
Mathias
On Sat, Jan 28, 2012 at 9:12 PM, Olivier Grisel <[email protected]>wrote:
> 2012/1/28 Mathias Verbeke <[email protected]>:
> > Hi Oliver,
> >
> > Thanks, that works! Sorry for the dummy questions.
>
> No pbm, the error message was confusing. Now that the 2 classes are
> merged users will no longer run in this kind of recurring issue in
> future releases.
>
> --
> 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