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
Applying a saved model to real time data in JAVA [SOLVED]
Good afternoon,
I am trying to understand how to use the RM JAVA API. My example is quite easy: I trained a classification model in the RM GUI and saved it to disk.
Now, I would like to load the model and apply it to some data stored in an array in JAVA. I was able to create an ExampleSet from the array and to create operators of the classes ModelLoader and ModelApplier. Also the connection from the ML output port to the MA model port is established.
1.) How do I connect the ExampleSet to the ModelApplier?
2.) When looking through the forum, I have already learned that building processes is no more state of the art. One can load the complete XML code and run it in JAVA. However, the descriptions of how to do this were to vague for me to turn them into JAVA code.
3.) Even if I am able to let the XML code run, how can I connect my data from the array to the XML code?
I am looking forward to your answers.
Best regards,
Alex
I am trying to understand how to use the RM JAVA API. My example is quite easy: I trained a classification model in the RM GUI and saved it to disk.
Now, I would like to load the model and apply it to some data stored in an array in JAVA. I was able to create an ExampleSet from the array and to create operators of the classes ModelLoader and ModelApplier. Also the connection from the ML output port to the MA model port is established.
1.) How do I connect the ExampleSet to the ModelApplier?
2.) When looking through the forum, I have already learned that building processes is no more state of the art. One can load the complete XML code and run it in JAVA. However, the descriptions of how to do this were to vague for me to turn them into JAVA code.
3.) Even if I am able to let the XML code run, how can I connect my data from the array to the XML code?
I am looking forward to your answers.
Best regards,
Alex
Tagged:
0
Answers
I have posted the information you seek more than once before, but here we go again:
1) Build your process in RapidMiner via the GUI. Save it to your repository (or don't and just save the XML somewhere).
2) Load the process via java
3) give the process input IOObjects (e.g. your model, your data, etc (note that the process input ports have to be connected to the appropriate operators!)
4) run the process and store the result Alternatively, if you don't want to use the repository:
Regards,
Marco