A program to recognize and reward our most engaged community members
String xml = com.rapidminer.tools.Tools.readTextFile(is);Process process = new Process(xml);
IOContainer ioResult = process.run();if (ioResult.getElementAt(0) instanceof ExampleSet) { resultSet = (ExampleSet)ioResult.getElementAt(0);}
<?xml version="1.0" encoding="UTF-8" standalone="no"?><process version="5.1.008"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="5.1.008" expanded="true" name="Process"> <process expanded="true" height="100" width="212"> <operator activated="true" class="read_excel" compatibility="5.1.008" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30"> <parameter key="excel_file" value="C:\Excel\Employee1.xls"/> <list key="annotations"/> <list key="data_set_meta_data_information"/> </operator> <connect from_op="Read Excel" from_port="output" to_port="result 1"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> </process> </operator></process>
Attribute att = exampleSet.getAttributes().get("Client");for (Example example : exampleSet) { String value = example.getValueAsString(att); // if att is nominal, otherwise: Double value = example.getValue(att);}