how to export models?

User: "juju"
New Altair Community Member
Updated by Jocelyn

Hi, I would like to export models in RM, and later see in other softwares. Is there a way to do it?

 

So the basic thing I'm thinking of is to export the text/table part in the model, a further thing is to save the tree strucutre in a tree model.

 

Thanks-

 

Trivial sample code (for exmale these two models)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.4.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="6.4.000" expanded="true" height="60" name="Generate Data" width="90" x="45" y="30">
<parameter key="target_function" value="polynomial classification"/>
</operator>
<operator activated="true" class="multiply" compatibility="6.4.000" expanded="true" height="94" name="Multiply" width="90" x="179" y="30"/>
<operator activated="true" class="support_vector_machine_libsvm" compatibility="6.4.000" expanded="true" height="76" name="SVM" width="90" x="380" y="30">
<list key="class_weights"/>
</operator>
<operator activated="true" class="parallel_decision_tree" compatibility="6.4.000" expanded="true" height="76" name="Decision Tree" width="90" x="380" y="165"/>
<connect from_op="Generate Data" from_port="output" to_op="Multiply" to_port="input"/>
<connect from_op="Multiply" from_port="output 1" to_op="SVM" to_port="training set"/>
<connect from_op="Multiply" from_port="output 2" to_op="Decision Tree" to_port="training set"/>
<connect from_op="SVM" from_port="model" to_port="result 1"/>
<connect from_op="Decision Tree" from_port="model" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Telcontar120"
    New Altair Community Member
    Accepted Answer

    Unfortunately it generally isn't easy to move models from one type of analytics software to another.  You have a couple of options, although you won't be able to export every kind of model easily.  What other software in particular are you thinking of?

     

    First, there is a "Write PMML" operator which supports some standard types of models but not all.  Also, not all software is equipped to read PMML models, so it may or may not help you.

     

    For simple models like linear or logistic regression, it's not too cumbersome to code the models manually.  For decision trees, there is an operator "Tree to Rules" which represents all the splits of the trees in a rule form that can also be exported as text and then converted manually into formats like SQL.

     

    Of course, the beauty of RapidMiner is that it is designed to be able to handle scoring in production environments, which would eliminate the need to represent the model in some other software.  So you also may want to explore whether you can just use RapidMiner to do not only the modeling work but also the ongoing scoring of records as needed.