libsvm predict method confusion
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 5
--
Chapters
00:00 Question
01:27 Accepted answer (Score 5)
01:50 Answer 2 (Score 1)
02:06 Thank you
--
Full question
https://stackoverflow.com/questions/4542...
Answer 1 links:
http://scikit-learn.sourceforge.net/
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #machinelearning #libsvm
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 5
--
Chapters
00:00 Question
01:27 Accepted answer (Score 5)
01:50 Answer 2 (Score 1)
02:06 Thank you
--
Full question
https://stackoverflow.com/questions/4542...
Answer 1 links:
http://scikit-learn.sourceforge.net/
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #machinelearning #libsvm
#avk47
ACCEPTED ANSWER
Score 5
It uses the true labels to give you accuracy statistics in case you are doing an out-of-sample test.
If you are running it "online", i.e. you actually don't have the true labels, then just put [0]*len(z) instead of y
ANSWER 2
Score 1
You might consider using
http://scikit-learn.sourceforge.net/
That has a great python binding of libsvm