"RapidMiner process integrated in Java - how to execute macros."

onesix4
New Altair Community Member
Based on the following post:
http://rapid-i.com/rapidforum/index.php/topic,7785.msg26715.html#msg26715
I was able to build a java application that executes the a RapidMiner process.
Process process = new Process(new File("C:\\Users\\Goutham\\.RapidMiner5\\repositories\\Local Repository\\TTT_REFACTORING/HTTP_ct5_categories.rmp "));
process.run();
*/
I would like to pass macro to this process in java. Has anybody had success in doing this in java..
I know you can execute this at command line:
/scripts/rapidminer -f ../TTT_REFACTORING/HTTP_ct5_categories.rmp "-MdateT=2010-11-11" "-Mtmzone=PST" "-MOutFile=/tmp/HTTP_ct5_cat_result.csv"
Thanks.
http://rapid-i.com/rapidforum/index.php/topic,7785.msg26715.html#msg26715
I was able to build a java application that executes the a RapidMiner process.
Process process = new Process(new File("C:\\Users\\Goutham\\.RapidMiner5\\repositories\\Local Repository\\TTT_REFACTORING/HTTP_ct5_categories.rmp "));
process.run();
*/
I would like to pass macro to this process in java. Has anybody had success in doing this in java..
I know you can execute this at command line:
/scripts/rapidminer -f ../TTT_REFACTORING/HTTP_ct5_categories.rmp "-MdateT=2010-11-11" "-Mtmzone=PST" "-MOutFile=/tmp/HTTP_ct5_cat_result.csv"
Thanks.
0
Answers
-
Hi,
you can use the following before running your process:
Regards,
for (Map.Entry<String, String> macro : macroMap.entrySet()) {
process.getContext().addMacro(new Pair<String, String>(macro.getKey(), macro.getValue()));
}
Marco0