"implementing rapidminer in java application"

New Altair Community Member
Updated by Jocelyn
how we run that process from netbeans ?
in netbeans i run code to creating a proccesse and its run successfully but no output result show in netbeans
i run following code in netbeans :::
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package processcreator;
import com.rapidminer.tools.OperatorService;
import com.rapidminer.RapidMiner;
import com.rapidminer.Process;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.generator.ExampleSetGenerator;
import java.io.IOException;
public class ProcessCreator {
private static IOObject myExampleSet;
public static Process createProcess() {
// invoke init before using the OperatorService
RapidMiner.init();
// create process
Process process = new Process();
try {
// create operator
Operator inputOperator =
OperatorService.createOperator(ExampleSetGenerator.class);
// set parameters
inputOperator.setParameter("target_function", "sum classification");
// add operator to process
process.getRootOperator().addOperator(inputOperator);
// add other operators and set parameters
// [...]
} catch (Exception e) { e.printStackTrace(); }
return process;
}
public static void main(String[] argv) {
// create process
Process process = createProcess();
// print process setup
System.out.println(process.getRootOperator().createProcessTree(0));
try {
// perform process
process.run();
// to run the process with input created by your application use
// process.run(new IOContainer(new IOObject[] { ... your objects ... });
} catch (OperatorException e) { e.printStackTrace(); }
}
}
please give the solution that how i run rapid miner process in java application
in netbeans i run code to creating a proccesse and its run successfully but no output result show in netbeans
i run following code in netbeans :::
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package processcreator;
import com.rapidminer.tools.OperatorService;
import com.rapidminer.RapidMiner;
import com.rapidminer.Process;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.generator.ExampleSetGenerator;
import java.io.IOException;
public class ProcessCreator {
private static IOObject myExampleSet;
public static Process createProcess() {
// invoke init before using the OperatorService
RapidMiner.init();
// create process
Process process = new Process();
try {
// create operator
Operator inputOperator =
OperatorService.createOperator(ExampleSetGenerator.class);
// set parameters
inputOperator.setParameter("target_function", "sum classification");
// add operator to process
process.getRootOperator().addOperator(inputOperator);
// add other operators and set parameters
// [...]
} catch (Exception e) { e.printStackTrace(); }
return process;
}
public static void main(String[] argv) {
// create process
Process process = createProcess();
// print process setup
System.out.println(process.getRootOperator().createProcessTree(0));
try {
// perform process
process.run();
// to run the process with input created by your application use
// process.run(new IOContainer(new IOObject[] { ... your objects ... });
} catch (OperatorException e) { e.printStackTrace(); }
}
}
please give the solution that how i run rapid miner process in java application