我可以导出RapidMiner模型与python集成吗? [英] Can I export RapidMiner model to integrate with python?

查看:569
本文介绍了我可以导出RapidMiner模型与python集成吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试了很多算法并在我的数据集中对其进行评估之后,我已经使用RapidMiner训练了分类器模型. 我也将模型从RapidMiner导出为XML和pkl文件,但无法在我的python程序(scikit-learn)中读取. 有什么方法可以在Python程序中导入RapidMiner分类器/模型,并使用它来预测或分类最终应用程序中的新数据?

I have trained a classifier model using RapidMiner after a trying a lot of algorithms and evaluate it on my dataset. I also export the model from RapidMiner as XML and pkl file, but I can't read it in my python program (scikit-learn). Is there any way to import RapidMiner classifier/model in a python program and use it to predict or classify new data in my end application?

推荐答案

实际上,我会说不-如果需要的话,从一开始就在sklearn中训练模型.

Practically, I would say no - just train your model in sklearn from the beginning if that's where you want it.

您的RapidMiner模型是某种对象.您要导出的两种格式只是存储方法. Sklearn模型是另一种对象.您不能直接保存其中一个并将其加载到另一个中.一个类似的例子是询问您是否可以乘坐飞机发动机并将其装载到火车上.

Your RapidMiner model is some kind of object. The two formats you are exporting as are just storage methods. Sklearn models are a different kind of object. You can't directly save one and load it into the other. A similar example would be to ask if you can take an airplane engine and load it into a train.

要执行您要的操作,您需要获取分类器保存的基础数据,找到格式,然后找出一种以与sklearn分类器相同的格式获取数据的方法.这取决于您拥有的分类器类型.例如,如果您使用贝叶斯模型,则可以以某种方式捕获先验概率,然后使用这些概率,但这并不是不重要的.

To do what you're asking, you'll need to take the underlying data that your classifier saved, find the format, and then figure out a way to get it in the same format as a sklearn classifier. This is dependent on what type of classifier you have. For example, if you're using a bayesian model, you could somehow capture the prior probabilities and then use those, but this isn't trivial.

这篇关于我可以导出RapidMiner模型与python集成吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆