"Integrating RM5 process in a Java application"
im
New Altair Community Member
Hi, I have a little rapid miner 5 process that simply reads a csv, changes attribute to label and then i aply a decision tree. It runs ok.
How can I export that process in order to be possible to run it from a Java application?
Any little sample would be very appreciated.
Suppose I have defined these two operators:
Operator inputOperator = OperatorService.createOperator("read_csv.class");
inputOperator.setParameter("file_name","C:\\ing.csv");
Operator inputOperator2 = OperatorService.createOperator("set_role.class");
inputOperator2.setParameter("name","value");
inputOperator2.setParameter("target_role","label");
How do I connect the read CVS to the setRole operator?
Thanks a lot
IM
How can I export that process in order to be possible to run it from a Java application?
Any little sample would be very appreciated.
Suppose I have defined these two operators:
Operator inputOperator = OperatorService.createOperator("read_csv.class");
inputOperator.setParameter("file_name","C:\\ing.csv");
Operator inputOperator2 = OperatorService.createOperator("set_role.class");
inputOperator2.setParameter("name","value");
inputOperator2.setParameter("target_role","label");
How do I connect the read CVS to the setRole operator?
Thanks a lot
IM
0
Answers
-
Hi,
you could save a process designed in RapidMiner to xml and then load it using new Process(file) and execute it via process.run.
Greetings,
Sebastian0 -
Thank you Sebastian.
I used the option menu File|Export process to write it to xml file. Then when i try to load it the compiler says:
[Fatal Error] :1:1: Content is not allowed in prolog.
com.rapidminer.tools.XMLException: Cannot parse document: Content is not allowed in prolog.
at com.rapidminer.Process.readProcess(Process.java:887)
at com.rapidminer.Process.readProcess(Process.java:862)
at com.rapidminer.Process.<init>(Process.java:225)
at BkThread.createModel(BkThread.java:77)
at BkThread.MakeAndExecuteModel(BkThread.java:47)
at BkThread.run(BkThread.java:31)
Any help?
IM0 -
Hi,
would you post or attach a link on this process file?
Greetings,
Sebastian0 -
How sad... it was invisible characters :-(
It is running now very well.
Thank you.
IM0