0

I have a trained SVM classifier in MATLAB (CompactClassificationSVM), with all its settings and the support vectors etc. However, I need to perform predictions on an Android tablet, so I'd prefer to reproduce the model exactly in Java. I do not have the training data available.

Easiest would be if MATLAB allowed exporting of the model into a PMML file, but I cannot find any way to do so.

Another option would be to use a library for SVMs, but I don't see ways to get a trained model without actually training it using that library first. This library would not have to be in Java, if that library supports exporting to PMML.

Does anyone have any suggestions on how to go about exporting a MATLAB SVM trained classifier to PMML or porting it to Java?

  • Just as an idea, you can train your data with weka, that let you play around. Then everything is in java and that should be pretty much straightforward. – R.Falque Mar 04 '16 at 08:39
  • Can't you just check the parameters of the trained model in MATLAB and then input them directly (i.e. skip the training) in your Java library? So for example if it was a NN you'd need the number of nodes in each layer, all the weights, the activation functions etc. For SVM you'd need the support vectors or margin lines (I don't know how they're specified), the kernel function and it's parameters etc – Dan Mar 04 '16 at 08:57
  • @R.Falque I would, but sadly I don't have the training data available. – BaggerSmurf Mar 04 '16 at 11:56
  • @Dan I have all the parameters. However, there seem to be far more than I can see as input in other libraries. I also can't find much documentation of libraries that allow you to input the things like support vectors without acquiring them by training. If I can find such a library with such documentation that would really help me out. – BaggerSmurf Mar 04 '16 at 11:56

0 Answers0