将PMML中的SVM模型导入到Java或Python? [英] Import an SVM model in PMML to Java or Python?
问题描述
简短的问题:是否存在用于Java,Python或其他任何支持SVM模型的主要编程语言的PMML接口?
Short question: is there a PMML interface for Java, Python or any other major programming language that supports SVM models?
背景:我已经使用kernlab
包中的ksvm
函数在R中训练了一个SVM模型.现在,我想在其他软件中使用此模型.要从R中导出它,我想我可以通过pmml
R包使用PMML(预测模型标记语言).
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.
但是,我找不到任何适用于Java,Python或任何允许导入此类模型的语言的库. 数据挖掘组列出了很多PMML接口,但这些接口大多数都是用于统计的特定工具.也有 libsvm 通用库,但是目前尚不清楚可用于将模型从一个界面迁移到另一个界面.
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.
推荐答案
您可以导入使用任何语言训练的模型.有一个Python示例使用scikit-learn重新初始化学习的线性模型
You can import the model you trained in any language. There is an example for Python Reinitializing learned linear models with scikit-learn
这篇关于将PMML中的SVM模型导入到Java或Python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!