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
"Integrating RapidMiner into a Java application"
nicugeorgian
Member Posts: 31 Maven
I created a small Java archive (jar) that uses RapidMiner to return a "forecast" in the form of a regression tree. To get regression trees, I use a Weka operator.
I plan to upload this jar file on a server such that it can be invoked, through some application, by several users / clients.
It's not very clear to me yet how RapidMiner will be integrated. I would need your help in this respect
1. Is it enough if I have the jar files rapidminer.jar and weka.jar on the server and I point to them (with the "classpath" option) when the jar file gets called? ???
Or should I install RapidMiner on the server? I assume RapidMiner shoould not be installed on the clients' machines.
2. If it's necessary to install RapidMiner on the server, should I also have (in the Java application) the following two lines before any RapidMiner operator gets invoked?
3. Is there a way to only upload the RapidMiner operators my Java application invokes?
4. I assume I should implement the Java application to be thread-safe such that it can safely be called by clients/users. Is this so?
Thanks for any suggestion,
Geo
I plan to upload this jar file on a server such that it can be invoked, through some application, by several users / clients.
It's not very clear to me yet how RapidMiner will be integrated. I would need your help in this respect
1. Is it enough if I have the jar files rapidminer.jar and weka.jar on the server and I point to them (with the "classpath" option) when the jar file gets called? ???
Or should I install RapidMiner on the server? I assume RapidMiner shoould not be installed on the clients' machines.
2. If it's necessary to install RapidMiner on the server, should I also have (in the Java application) the following two lines before any RapidMiner operator gets invoked?
Is this correct? ???
System.setProperty("rapidminer.home", "a directory on the server where a lib directory exists containing weka.jar and rapidminer.jar");
RapidMiner.init(true, false, false, false);
3. Is there a way to only upload the RapidMiner operators my Java application invokes?
4. I assume I should implement the Java application to be thread-safe such that it can safely be called by clients/users. Is this so?
Thanks for any suggestion,
Geo
Tagged:
0
Answers
first of all I would like to clarify something else (just because we recently had some bad experience with a similar request): under which license you are going to use RapidMiner and which is the license of your web service? Many people unfortunately misbelieve that "hiding" the software behind a web service and decoupling RapidMiner from their own application in this way would be a correct way of allowing any license - which isn't true. So please contact us at contact@rapid-i.com for discussing the licensing details.
I don't want to sound rude but I simply would like to clarify those things as early as possible so that no harm is done and no work is done for nothing...
ad 1)
The jar file is usually sufficient if you invoke the operators from your own code.
ad 2)
see above
ad 3)
yes, it is actually possible to "strip" RapidMiner down but it is quite tedious work and often not worth the effort.
ad 4)
if you have complete processes, you can usually run it within a thread independent of anything else. So simply run a single independent process for each client should be fine.
Cheers,
Ingo
The problem dissapears if I explicitly set the property rapidminer.home: I would, however, prefer not to set the property. I better include the necessary jar files in classpath. What do you exactly mean with "invoke the operators from your own code"?
Do you mean that I should create operators using the corresponding class names instead of operators' descriptions? Like in the following example? If yes, what about the operators that don't have their own class, e.g., the Weka operator W-M5P? In this case, should one use a string based creation, with the operator description? Like the following? If yes, how can I then set up the parameters specific to W-M5P? I guess in such a case, I should still use the string based operator creation. I assume the initialization line is still necessary, isn't it? I only have one (small) process. How can it be ensured that the process is run independently by each client? Could you pls give me some tips.
Many thanks!
There's also something else: what string should one use to create the corresponding operator: "M5P" or "W-M5P"?
Thanks!
Did anyone make use of a weka operator without setting the rapidminer.home property? Is it possible at all to skip setting this property?
Thanks!