ExampleSet as Operator in a process (JAVA)

sWn
sWn New Altair Community Member
edited November 5 in Community Q&A
Hi,

I'm trying to implement a DecisionTreeLearner and created an ExampleSet like explained in [1].

Now I'm stuck with the integration of this ExampleSet in a process with the DecisionTreeLearner. What I did was:

Process process = new Process();
DecisionTreeLearner dtl = OperatorService.createOperator(DecisionTreeLearner.class);
process.getRootOperator().getSubprocess(0).addOperator(dtl);
process.run();
How can I add my ExampleSet to the process (maybe as an operator) and connect the ports like
myInputDataExampleSet.getOutputPorts().getPortByName("nameOfOutputPort").connectTo(dtl.getInputPorts().getPortByName("training set"));
I can only find examples where the data is coming from an input file and I can't find an operator to which I can simply add my ExampleSet.

Thanks and Sincerely
sWn

Sources:
[1] http://rapid-i.com/wiki/index.php?title=Integrating_RapidMiner_into_your_application#Transform_data_for_RapidMiner

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    I would suggest you use the recommended way of executing a RapidMiner process you previously built via the RapidMiner GUI, instead of trying to create one from scratch.
    See here and read my two replies and then read this as well. That should tell you all you need to know ;)

    Regards,
    Marco
  • sWn
    sWn New Altair Community Member
    Hi,

    thanks for your reply! That really seems to be a much easier way to solve my problem.

    Sincerely
    sWn