Can I export RapidMiner model to integrate with py

2019-07-26 09:33发布

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?

2条回答
Animai°情兽
2楼-- · 2019-07-26 10:17

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

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.

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.

查看更多
爷的心禁止访问
3楼-- · 2019-07-26 10:22

You could use the pmml extenstion for RapidMiner to export your model.

For python there is for example the augustus library that can work with pmml files.

查看更多
登录 后发表回答