On 19 January 2012 11:57, Manish Katyal <[email protected]> wrote:
> Just getting started with scikits and was running into a problem:
>
> My large dataset is in SVMLight format. I load it like (X_train, y_train =
> load_svmlight_file(f))
> When I try using the SVM
> Classifier: svm.SVC(gamma=0.001).fit(X_train,y_train), I get the following
> error:
>
> "File
> "/var/tmp/scilearn/local/lib/python2.7/site-packages/numpy/core/numeric.py",
> line 235, in asarray
>
> return array(a, dtype, copy=False, order=order)
>
> ValueError: setting an array element with a sequence."
> Any ideas?
>
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> 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-d2d
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
This types of errors usually happen when you try to convert a non-even list
of lists into a numpy array (i.e. trying np.array([[1,2,3], [1,2]]), rather
than np.array([[1,2,3], [1,2, 3]]).
Was that the full error stack? If not, it would be helpful to see the
specific calling functions.
--
Public key at: http://pgp.mit.edu/ Search for this email address and select
the key from "2011-08-19" (key id: 54BA8735)
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
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-d2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general