AFAIK, SVM can't deal with nested features and/or missing features. You
probably need to manually encode your features to fixed-length array
according to your particular setting.

On Tue, Mar 27, 2012 at 9:40 AM, Dushyant Arora
<[email protected]>wrote:

> Here is what my dataset looks like:
>
> I do periodic polling/scan of a particular data and it returns back some
> features like
> [1, 2, 3]
> [4, 5, 6]
> etc
> The number of features are always 3 but the number of lists returned may
> be different. Say in first scan I get back 10 lists, in second I get 4
> lists etc.
> Now I want to use SVM to distinguish between two such scans/polls. So, I
> want to give the following training data:
>
> X = [[[1,2,3], [4,5,6]], [[7,8,9]], [[3,7,1],[7,8,3]]]>>> Y = [1, 1, 2]>>> 
> clf = svm.SVC()>>> clf.fit(X, Y)SVC(C=1.0, cache_size=200, coef0=0.0, 
> degree=3, gamma=1.0, kernel='rbf',  probability=False, scale_C=False, 
> shrinking=True, tol=0.001)*
> *
>
> *But I get an error when I run this. How can I use my data with multi-class 
> SVMs*
>
> *
> *
>
> *Thanks,*
>
> *Dushyant*
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>


-- 
Best Wishes
--------------------------------------------
Meng Xinfan(蒙新泛)
Institute of Computational Linguistics
Department of Computer Science & Technology
School of Electronic Engineering & Computer Science
Peking University
Beijing, 100871
China
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to