Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
How to read the output?
Hei..
I`ve try the APi, but i still dont know how to see the output on my process..
here the console says:
I`ve try the APi, but i still dont know how to see the output on my process..
here the console says:
and here is the code
Jan 17, 2012 9:53:17 AM com.rapidminer.tools.WrapperLoggingHandler log
INFO: No filename given for result file, using stdout for logging results!
Jan 17, 2012 9:53:17 AM com.rapidminer.Process run
INFO: Process starts
Jan 17, 2012 9:53:18 AM com.rapidminer.Process run
INFO: Process finished successfully after 0 s
Jan 17, 2012 9:53:18 AM com.rapidminer.tools.WrapperLoggingHandler log
INFO: No filename given for result file, using stdout for logging results!
Jan 17, 2012 9:53:18 AM com.rapidminer.Process run
INFO: Process starts
Jan 17, 2012 9:53:18 AM com.rapidminer.Process run
INFO: Process finished successfully after 0 s
so what should i do next, if i want to see the output?
import com.rapidminer.repository.RepositoryLocation;
import com.rapidminer.repository.RepositoryManager;
import com.rapidminer.tools.OperatorService;
import com.rapidminer.Process;
import com.rapidminer.*;
import com.rapidminer.RapidMiner.ExecutionMode;
import com.rapidminer.example.Attribute;
import com.rapidminer.example.Example;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
//import com.rapidminer.operator.ExecutionUnit;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.ExecutionMode.*;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.gui.*;
import java.io.*;
//import com.rapidminer.operator.OperatorException;
//import com.rapidminer.operator.IOContainer;
//import java.io.IOException;
import java.io.File;
import java.util.Iterator;
public class Main {
static String line;
static String x="C:\\Documents and Settings\\user\\My Documents\\RapidMiner\\model1.rmp";
private static String readFileAsString(String filePath)
throws java.io.IOException{
StringBuffer fileData = new StringBuffer(1000);
BufferedReader reader = new BufferedReader(
new FileReader(filePath));
char[] buf = new char[1024];
int numRead=0;
while((numRead=reader.read(buf)) != -1){
String readData = String.valueOf(buf, 0, numRead);
fileData.append(readData);
buf = new char[1024];
}
reader.close();
return fileData.toString();
}
public static void main(String[] argv) throws Exception {
// MUST BE INVOKED BEFORE ANYTHING ELSE !!!
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
RapidMiner.init();
Process process=new Process(readFileAsString(x));
IOContainer ioResult = process.run();
if (ioResult.getElementAt(0) instanceof ExampleSet) {
ExampleSet resultSet = (ExampleSet)ioResult.getElementAt(0);
RepositoryLocation resloc = new RepositoryLocation("//MyRepository/contohg");
RepositoryManager.getInstance(null).store(resultSet, resloc, null);
}
process.run();
}
}
Tagged:
0
Answers
you can just use: Best,
Vaclav
thx for your reply..
I`ve add the code, but its appeared error
Exception in thread "main" com.rapidminer.operator.MissingIOObjectException: The operator needs some input of type com.rapidminer.example.ExampleSet which is not provided.
so how i can provided the input??
I want to use data source from excel type...
Best,
Vaclav
if your process requires some kind of input data, you can check this post to see how it can be done: click
A way to get the output example set has been provided by Vaclav
Regards,
Marco
here is my code: and the output i get is: its juts the value of my attribute, and now i want to output the name of my attribute..
there is no method getAttributeName() in rapidminer,rite? haha...
so what should i do?
Did you look at the Api for the Attribute class?
To get the name of an attribute, you can simply call Regards,
Marco