The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] without
Dear members,
I have a quite simple question. If I want to integrate rapidminer process to my java application without instalation rapidminer on my computer, what I need to do?
ex: my code is:
Thank you for your answer
I have a quite simple question. If I want to integrate rapidminer process to my java application without instalation rapidminer on my computer, what I need to do?
ex: my code is:
how can I run this code, if I didn't install rapidminer or eclipse?
import com.rapidminer.tools.OperatorService;
import com.rapidminer.RapidMiner;
import com.rapidminer.Process;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import java.io.IOException;
public class ProcessCreator {
public static Process createProcess() {
try {
// invoke init before using the OperatorService
RapidMiner.init();
} catch (IOException e) { e.printStackTrace(); }
// create process
Process process = new Process();
try {
// create operator
Operator inputOperator =
OperatorService.createOperator(ExampleSetGenerator.class);
// set parameters
inputOperator.setParameter("target_function", "sum classification");
// add operator to process
process.getRootOperator().addOperator(inputOperator);
// add other operators and set parameters
// [...]
} catch (Exception e) { e.printStackTrace(); }
return process;
}
public static void main(String[] argv) {
// create process
Process process = createProcess();
// print process setup
System.out.println(process.getRootOperator().createProcessTree(0));
try {
// perform process
process.run();
// to run the process with input created by your application use
// process.run(new IOContainer(new IOObject[] { ... your objects ... });
} catch (OperatorException e) { e.printStackTrace(); }
}
}
Thank you for your answer
Tagged:
0
Answers
please use the search function next time.
1) Have a look here: click
2) What do you mean, without RapidMiner and Eclipse - you of course need to create a .jar which contains all necessary libraries and settings. Just setup RapidMiner als a library for your java project as you would with any other library.
Regards,
Marco
Sadly parts of the wiki are out of date. You don't need to create files or folders, just add RM as a library to your java project in your favorite IDE and when you deploy your application make sure the libraries you use are part of your application.
Also I have no clue about your error because basically saying "my program crashes, why?" provides no information at all.
Regards,
Marco
thank you for your answer. My program runs well till I call method rapidminer.init(). Then program finishes. I tried to surround this method by try-catch with printing an error message inside but nothing happened. Each of the order classes or methods implemented by rapidminer runs ok, so I cannot even guess where is the problem. Without calling this method my program finishes when constructor Process(processasXML) is called with an error message "unknown operator class process".
Could you advise me please?
Have a nice day