How can I use an SVM in Matlab without an external library?

0

I am a teaching assistant for a machine learning class and we are in the process of making an assignment to study SVMs. The problem is that our lab installations of Matlab do not have the statistics toolbox nor do they have installed liblinear or libsvm. While I understand that a local installation of the library can be done, I don't want to distract the student with this task before they can actually start the assignment. I am looking for suggestions for dealing with this problem. For instance, are there any simple implementations as m files in Matlab that students could simply include in their scripts?

DaemonMaker

Posted 2013-10-05T16:38:36.023

Reputation: 101

Installing libsvm is by far the best way to go. It does not take long and is better than any other off-the-shelf implementation I know. If you have quadprog at your disposal, you could alternatively implement your own (inefficient) SVM solver. – Marc Claesen – 2013-10-05T17:01:14.523

Installing libsvm on all the machines in the time frame alloted is not an option. Asking the students to do it places an undue burden on them and only distracts them from the purpose of the assignment so I will not do that.

As for quadprog, that is a good suggestion. Thank you. I don't know if it is available on the machines but I can check. Since posting the question I have been researching implementing my own solver anyway since efficiency isn't a problem given that we're working with toy problems. – None – 2013-10-05T17:45:24.027

Although this question is about issues on-topic here on CrossValidated, because it is incomprehensible to anybody who is not a MatLab user, I have to conclude it is solely of interest to MatLab users and therefore expect it to have better chances of getting good answers on a site with a community of MatLab power users. – None – 2013-10-07T14:44:53.143

Answers

0

It turns out that using libsvm with Matlab is as simple as downloading it, unpacking it, and executing make.m in the matlab directory. The only caveat appears to be that this last step, executing make.m, must be done each time Matlab is started.

DaemonMaker

Posted 2013-10-05T16:38:36.023

Reputation: 101