The Python Oracle

libsvm predict method confusion

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Underwater World

--

Chapters
00:00 Libsvm Predict Method Confusion
01:13 Accepted Answer Score 5
01:31 Answer 2 Score 1
01:39 Thank you

--

Full question
https://stackoverflow.com/questions/4542...

--

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