An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
package com.rapidminer.operator.my;import com.rapidminer.example.*;import com.rapidminer.operator .*;import com.rapidminer.parameter.*;import java.io.*;import java.util.List ;public class ExampleSetWriter extends Operator { public ExampleSetWriter(OperatorDescription description) { super(description); }@Override public IOObject[] apply() throws OperatorException { File file = getParameterAsFile("example_set_file"); ExampleSet eSet = getInput(ExampleSet.class); try { PrintWriter out = new PrintWriter(new FileWriter(file)); for (Example example : eSet) { out.println(example); } out.close(); } catch (IOException e) { throw new UserError(this, 303, file, e.getMessage()); } return new IOObject[] {eSet}; }@Override public Class<?>[] getInputClasses() { return new Class[] {ExampleSet.class}; }@Override public Class<?>[] getOutputClasses() { return new Class[] {ExampleSet.class}; }@Override public List<ParameterType> getParameterTypes() { List<ParameterType> types = super.getParameterTypes(); types.add(new ParameterTypeFile("example_set_file", "The file for the examples", "txt", false)); return types; }}
<operators> <!-- Your own Operator --> <operator name = "MyExampleSetWriter" class = "com.rapidminer.operator.my.ExampleSetWriter" description = "Writes example set into file." group = "MyOps" /></operators>
Manifest-Version: 1.0RapidMiner-Type: RapidMiner_Plugin
sir, i am making a project in rapidminer .i want a new extension for my project.would you make it for me