[SOLVED] Java application
l__chine
New Altair Community Member
Hi,
I would like to ask you for help with some problem. I created a model in RapidMiner and now I need to create a java application that could use this model. So I need to write a code. But I don't know how should I start. I've noticed there is some possible to run a RapidMiner process in Eclipse but I haven't understood how it works yet. I begin to be desperate because days and days I searched the informations about how to do that but without any luck.
Could you please give me some advices or recommend me some documents for my work?
I would like to ask you for help with some problem. I created a model in RapidMiner and now I need to create a java application that could use this model. So I need to write a code. But I don't know how should I start. I've noticed there is some possible to run a RapidMiner process in Eclipse but I haven't understood how it works yet. I begin to be desperate because days and days I searched the informations about how to do that but without any luck.
Could you please give me some advices or recommend me some documents for my work?
0
Answers
-
-
I think you didn't understand me quite good, so I try to express my ideas better. I searched the way how to write my own code. The problem is simple. I neither can use another person's code neither write my own one because I don't know what are these methods used for? Javadoc informations are to brief for me to understand.
For example: I got a process result in a result perspective, so I click on an example set (Retrieve) and also click on Data View. That's there, where my result is displayed as a string under a prediction label box. After running the process by method myProcess.run, what method should I use to get this result's string?
I'm sorry for my stupidity but there is something that I'm still missing.
Moreover, the basic statement
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
RapidMiner.init();
doesn't work. I get messages like '' syntax error on ".",...expected " or "identifier expected after this token" . I found somebody with similary problem, and tried his solutions (missing library maybe) but nothing happend. Do you have any idea?
Thank for response
0 -
I found something in the forum and the problems with errors (rapidminer init()) are gone. But still there is my first question from my second message I sent to you.0
-
Hi,
well the result of a process is always an IOContainer. So to find out what you get after a specific process, you could do something like this:
Depending on the type of the result you can then continue from there.
[...]
IOContainer resultContainer = process.run();
for (IOObject r : resultContainer.asList()) {
System.out.println(r.getClass());
}
Regards,
Marco0 -
I've received a message reporting to a class SimpleExampleSet. But I cannot find any method for displaying results from DataTable showed in Data view. I tried this way for printing results:
http://rapid-i.com/wiki/index.php?title=Integrating_RapidMiner_into_your_application
despite of a few mistakes in the code ( the method getExampleReader is undefined for the type ExampleSet), using the method getPredictedLabel() I received this:
#16 prediction(label) (binominal/single_value).
The value of prediction label is not visible. Please how could I get this value?
0 -
I think I figured it out. My code now looks like this.
So, this problem is solved.
IOContainer ioResult = myProcess.run(datasetfortesting);
ExampleSet resultSet = ioResult.get(ExampleSet.class);
for(Example example : resultSet){
Attributes atriba = example.getAttributes();
Attribute a = atriba.getPredictedLabel();
predictedLabel = example.getValueAsString(a);
System.out.println(predictedLabel);
}
Have a nice day0