"Get output ExampleSet error!"
Hi,
I want to import a csv file as a ExampleSet using CSVExampleSource, so I code sa:
Any one tell me how to do?
Thanks!
I want to import a csv file as a ExampleSet using CSVExampleSource, so I code sa:
RapidMiner.init();But I got the following error:
Operator trainingDataReader = OperatorService.createOperator(CSVExampleSource.class);
trainingDataReader.setParameter(CSVExampleSource.PARAMETER_CSV_FILE, "C:/Documents and Settings/tmd/data/data_forPrediction.csv");
trainingDataReader.setParameter(CSVExampleSource.PARAMETER_COLUMN_SEPARATORS, "\t");
trainingDataReader.setParameter(CSVExampleSource.PARAMETER_TRIM_LINES, "true");
trainingDataReader.setParameter(CSVExampleSource.PARAMETER_FIRST_ROW_AS_NAMES, "true");
Process process = new Process();
//add operators to process
process.getRootOperator().getSubprocess(0).addOperator(trainingDataReader);
IOContainer ioResult = process.run();
ExampleSet exampleSet = (ExampleSet) ioResult.getElementAt(0);
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0It seems nothing output by process.run();
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at com.rapidminer.operator.IOContainer.getElementAt(IOContainer.java:112)
Any one tell me how to do?
Thanks!
0
Answers
Thank you!