Re: [Scikit-learn-general] simple problem of doing support vector machine

2014-10-12 Thread Michael Eickenberg
Glad it helped. @larsman's answer on Stackoverflow is more pedagogic http://stackoverflow.com/questions/26325976/value-error-while-running-svm-in-sklearn To avoid duplication of effort, if you have posted the question elsewhere, it is helpful to provide a link when you write to the list (and vice

Re: [Scikit-learn-general] simple problem of doing support vector machine

2014-10-12 Thread Artur Bercik
Dear Michael Thank you very much. Your solution helped me perfectly. Artur Bercik On Sun, Oct 12, 2014 at 11:57 PM, Michael Eickenberg < [email protected]> wrote: > Dear Artur, > > the shapes of your input arrays got muddled up. As opposed to e.g. matlab, > in numpy there exist 1D ar

Re: [Scikit-learn-general] simple problem of doing support vector machine

2014-10-12 Thread Michael Eickenberg
Dear Artur, the shapes of your input arrays got muddled up. As opposed to e.g. matlab, in numpy there exist 1D arrays, and these are usually interpreted as line vectors. Thus, male_height, male_weight, male_age are all written into the same line by hstack. What you are looking to hstack are column

[Scikit-learn-general] simple problem of doing support vector machine

2014-10-12 Thread Artur Bercik
Dear sklearn users: I am hanging with the following simple problem of doing support vector machine with numpy arrays. I would be grateful if someone answer me. import numpy as np from sklearn import svm ##I have 3 classes/labels ('male', 'female','na') denoted as follows: labels = [0,1,2] ##Eac