group models

meliniakmeliniak Member Posts: 21 Contributor II
edited November 2018 in Help
Hi there,

i just want to make sure. i'm referring to 'group models' operator.  have a look at such process:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.006">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.1.006" expanded="true" name="Process">
   <process expanded="true" height="674" width="1389">
     <operator activated="true" class="read_arff" compatibility="5.1.006" expanded="true" height="60" name="Read ARFF" width="90" x="45" y="30">
       <list key="data_set_meta_data_information"/>
     </operator>
     <operator activated="true" class="multiply" compatibility="5.1.006" expanded="true" height="94" name="Multiply" width="90" x="112" y="210"/>
     <operator activated="true" class="filter_examples" compatibility="5.1.006" expanded="true" height="76" name="other kind of preprocessing" width="90" x="313" y="165"/>
     <operator activated="true" class="decision_tree" compatibility="5.1.006" expanded="true" height="76" name="Decision Tree" width="90" x="581" y="165"/>
     <operator activated="true" class="filter_examples" compatibility="5.1.006" expanded="true" height="76" name="some kind of preprocessing" width="90" x="313" y="345"/>
     <operator activated="true" class="decision_tree" compatibility="5.1.006" expanded="true" height="76" name="Decision Tree (2)" width="90" x="581" y="345"/>
     <operator activated="true" class="group_models" compatibility="5.1.006" expanded="true" height="94" name="Group Models" width="90" x="880" y="201"/>
     <connect from_op="Read ARFF" from_port="output" to_op="Multiply" to_port="input"/>
     <connect from_op="Multiply" from_port="output 1" to_op="other kind of preprocessing" to_port="example set input"/>
     <connect from_op="Multiply" from_port="output 2" to_op="some kind of preprocessing" to_port="example set input"/>
     <connect from_op="other kind of preprocessing" from_port="example set output" to_op="Decision Tree" to_port="training set"/>
     <connect from_op="Decision Tree" from_port="model" to_op="Group Models" to_port="models in 1"/>
     <connect from_op="some kind of preprocessing" from_port="example set output" to_op="Decision Tree (2)" to_port="training set"/>
     <connect from_op="Decision Tree (2)" from_port="model" to_op="Group Models" to_port="models in 2"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
   </process>
 </operator>
</process>
i want to export all models in the process into a single model. i'm assuming that group models operator should be used in that case. will it work fine in this case? i.e. both decision trees will be saved and all appropriate preprocessing will be done just like in this process?

could you elaborate somehow on this, please?

Answers

  • meliniakmeliniak Member Posts: 21 Contributor II
    should i move this thread to the development group?
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    the Group Models operator will return a model which, when applied, acts like you would have applied the original models in their respective order. Nothing more, nothing less. So if your question is whether the Filter Examples operators will be applied again as well or not, the answer is no (but as mentionied, the models have been influenced by the preprocessing).

    Regards,
    Marco
  • meliniakmeliniak Member Posts: 21 Contributor II
    thanks Marco.

    my goal is to be able to use all models as one in the java code. is there any solution, that would include the preprocessing operators into the model?

    if not, i guess i would need to use Process class instead of the Model one, and have two process, one for the training, and the second one that would apply the models. the latter one would be used in the code obviously. i just want to reduce clutter and redundancy that would be introduced along with two processes.

    am i missing some obvious solution? any hints highly appreciable :)
  • meliniakmeliniak Member Posts: 21 Contributor II
    just pinging - any ideas guys?
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    if your goal is to be able to execute processes via java code, you might want to consider building your processes in RapidMiner and then just executing them via java. You can pass parameters (IOObjects) to the process before executing it, so that might do what you want. See this: http://rapid-i.com/rapidforum/index.php/topic,3862.msg14364.html#msg14364

    Regards,
    Marco
  • meliniakmeliniak Member Posts: 21 Contributor II
    i'll give it a try, thank you sir.
Sign In or Register to comment.