简体   繁体   中英

Import an SVM model in PMML to Java or Python?

Short question : is there a PMML interface for Java, Python or any other major programming language that supports SVM models?

Background : I have trained an SVM model in R using the ksvm function from the kernlab package. Now I would like to use this model in a different piece of software. To export it from R, I think I could use PMML (Predictive Model Markup Language) via the pmml package for R.

However, I can't find any library for Java, Python, or basically any language that allows for importing such a model. The Data Mining Group lists quite a few PMML interfaces, but these are mostly specific tools for statistics. There is also the libsvm general library, but it is not clear how this can be used to migrate models from one to another interface.

You can import the model you trained in any language. There is an example for Python Reinitializing learned linear models with scikit-learn

You could use the Zementis ADAPA scoring engine to deploy your model and them access it through web-services. From my experience, ADAPA is also available as a Java library and so you can code against its Java API. Hope this helps.

A library called "Pattern" translates PMML models into Cascading apps in Java. Then you can run model scoring on Hadoop or within other Java apps. https://github.com/Cascading/pattern

There's a SVM impl for Pattern -- being rewritten for the latest update to the library. Check on the developer email list: https://groups.google.com/forum/?fromgroups#!forum/pattern-user

You can use Weka both as an Java API or as standalone tool, which works well for PPML with some classifiers. Check these classes in weka API: weka.classifiers.pmml.consumer.PMMLClassifier and weka.classifiers.pmml.consumer.SupportVectorMachineModel.

我相信JPMML(Java Evaluator PMML API)会做你想要的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM