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
CSVDataReader and Operator.apply method Issues
jaysonpryde
Member Posts: 20 Contributor II
Good day,
I'm new to rapidMiner/rapidMiner development. I am currently creating a java application that does simple classification.
However, i am encountering 2 issues inhibiting me to proceed to further development:
1. [CSVDataReader]: No operator description object given for 'com.rapidminer.operator.io.CSVDataReader'
- I am receiving the said exception when I ran this code snippet:
That is,
I'm new to rapidMiner/rapidMiner development. I am currently creating a java application that does simple classification.
However, i am encountering 2 issues inhibiting me to proceed to further development:
1. [CSVDataReader]: No operator description object given for 'com.rapidminer.operator.io.CSVDataReader'
- I am receiving the said exception when I ran this code snippet:
Operator unlabeled = OperatorService.createOperator(CSVDataReader.class);2. Operator.apply method is already deprecated
unlabeled.apply(new IOContainer());- as stated, .apply method of Operator object is deprecated. Are there any replacement(s) for this. Currently, I am doing it the long way.
That is,
Hoping to hear any feedback from you guys. Thank you
Process csvProcess = new Process();
csvProcess.getRootOperator().addOperator(unlabeled, 0);
IOContainer c = csvProcess.run();
ExampleSet es = c.get(ExampleSet.class);
Tagged:
0
Answers
I was able to address the 2 issues i've posted. The first one was resolved correcting the import (import com.rapidminer.operator.nio.CSVExampleSource instead of import com.rapidminer.operator.io.CSVExampleSource).
For the 2nd one, I am now using doWork() method. However, this returns void.
How will I be able to put the result of this to an IOContainer object? Casting it is not permitted
Hoping to hear feedback from you guys. Any help is greatly appreciated. Thank you
I will suggest what I always suggest when these kind of questions pop up
Use RapidMiner to create your processes via the GUI, and then just execute them via java code. That way is a) easier and b) much less error-prone.
To see how this could be done, check here.
Regards,
Marco