libsvm icon indicating copy to clipboard operation
libsvm copied to clipboard

How to load svm problem file into a variant in the type of "svm_problem"

Open cuckootan opened this issue 9 years ago • 1 comments

I can't find the interface that loads svm problem file into a variant in the type of "svm_problem", because it is very necessary before training a svm model. Can I fix it in another way?

cuckootan avatar Dec 02 '15 03:12 cuckootan

I think read_problem in svm-train.cpp is what you are looking for: https://github.com/cjlin1/libsvm/blob/master/svm-train.c#L278-L379

Sadly this function uses a lot of global variables, so it cannot be reused easily. (it writes into svm_problem prob)

mricherzhagen avatar Dec 07 '15 07:12 mricherzhagen