1

I have generated a libsvm model and i need to invoke them into my python codes. So that the user gives the raw input and then it converts into libsvm format and finally predicts the results stating the accuracy . Is it possible to do it.

1 Answer 1

1

svmutil.py which is included in the libsvm official release contains the method for loading the trainged libsvm model from file:

svm_load_model(model_file_name)

So you can just run (after importing it from svmutil)

clf = svm_load_model( 'model.txt' )

Of course package includes the full python binding to the libsvm, so you can perform any kind of actions (training, testing, predicting etc.) with it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.