🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Integrating RapidMiner with Java Application

User: "nelze"
New Altair Community Member
Updated by Jocelyn
I'm trying to integrate my rapidminer process into a java application. I need to dynamically input the test data, but the training set is already in the rapidminer process. (It's my first time trying to integrate rapidminer so I need some help). But when I run the code, it keeps saying this error:

[Fatal Error] :1:1: Premature end of file.
Exception in thread "main" java.lang.NullPointerException
   at NaiveClassifier.main(NaiveClassifier.java:34)

Line 33 and 34 is
Operator op = process.getOperator("Read Excel");
op.setParameter(CSVExampleSource.PARAMETER_FILENAME, myData);

where myData is just the filepath of the test data. I used CSV because my file is a .csv file. I'm not sure if I used it correctly. I also can't seem to find a list of the getoperator parameters so I left it at the default "Read Excel".

When I run the process in rapidminer (with me manually putting the test data in the process), it gives out the classification result.

My test data is unlabeled, so I don't know if that's the issue why it's causing the error. Also, the port in rapidminer is connected to the input port at the left side, since I assume that's what I need to do if I need to input test data dynamically. My test data is also comprised of many rows, so rapidminer needs to give me like an array of classification results.

I used the code posted in this forum sometime ago, the one which the admin posted.

Any help will be appreciated.

Find more posts tagged with