Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
How to connect Process and Operator?
prayerslayer
Member Posts: 3 Contributor I
Hello!
I'm very aware of the fact that it's not being welcomed to ask questions regarding the chaining of operators programatically. However, I need to do this for my thesis and hope that you'll kindly oversee it this time.
Everything works really well already, but I couldn't figure out how to connect the output of an operator to a result port of my process. Could anyone give me a hint? It's this part:
I tried to look for ports of the RootOperator, but there was no output:
The actual problem I have is that after the process finished, I can't access the result (because there is none, I guess).
I'm very aware of the fact that it's not being welcomed to ask questions regarding the chaining of operators programatically. However, I need to do this for my thesis and hope that you'll kindly oversee it this time.
Everything works really well already, but I couldn't figure out how to connect the output of an operator to a result port of my process. Could anyone give me a hint? It's this part:
I tried to look for ports of the RootOperator, but there was no output:
Am I able to add it anyway? Or somewhere else?
System.out.println("looking for process ports");
for (String port : process.getRootOperator().getInputPorts().getPortNames())
System.out.println(port);
The actual problem I have is that after the process finished, I can't access the result (because there is none, I guess).
INFO: Process finished successfully after 3 sAt this line:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:570)
at java.util.ArrayList.get(ArrayList.java:348)
at com.rapidminer.operator.IOContainer.getElementAt(IOContainer.java:112)
at BackendTest.main(BackendTest.java:128)
if (process_result.getElementAt(0) instanceof ExampleSet) { ... }Thanks in advance!
Tagged:
0
Answers
you may ask whatever you want to know - we just encourage others to use the GUI approach because it is much easier. However if there's a reason why you need to do it programatically, it is perfectly fine
I put together a quick example for you:
This is the example process with an operator not connected to an output port. This line connects the operator referenced by its name to the first output port of the process: And in case you need a procedure for input ports as well, you can find it here.
Regards,
Marco