"Problem with classifier using SVM, vector/ exampleset"
tssyspy
New Altair Community Member
Helo,i'm new with rapidminer and i have problems with my application,
i want to build a simple 2class text classifier with svm.. and then try to develop it.
i may not know how to build a example set from word vector...
PS: I bought the "How to extend rapidminer paper" but i only need to use existent methods
I read from "Integrating RapidMiner into your application"
I read other posts from forum (or i may have missed something)
if "ExamplesetWriter" and the "Process files from documents" components can transform from word vector to exampleset, why can't i do in java?
i hope for some quick answers what shoud i do..
Thanks
i get the msg on console:
import java.io.File;
import java.io.FileWriter;
import edu.udo.cs.wvtool.config.WVTConfiguration;
import edu.udo.cs.wvtool.config.WVTConfigurationFact;
import edu.udo.cs.wvtool.config.WVTConfigurationRule;
import edu.udo.cs.wvtool.generic.output.WordVectorWriter;
import edu.udo.cs.wvtool.generic.stemmer.DummyStemmer;
import edu.udo.cs.wvtool.generic.stemmer.LovinsStemmerWrapper;
import edu.udo.cs.wvtool.generic.stemmer.PorterStemmerWrapper;
import edu.udo.cs.wvtool.generic.stemmer.WVTStemmer;
import edu.udo.cs.wvtool.generic.tokenizer.NGramTokenizer;
import edu.udo.cs.wvtool.generic.tokenizer.WVTTokenizer;
import edu.udo.cs.wvtool.generic.vectorcreation.TFIDF;
import edu.udo.cs.wvtool.main.WVTDocumentInfo;
import edu.udo.cs.wvtool.main.WVTFileInputList;
import edu.udo.cs.wvtool.main.WVTWordVector;
import edu.udo.cs.wvtool.main.WVTool;
import edu.udo.cs.wvtool.wordlist.WVTWordList;
import com.rapidminer.*;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.Model;
import com.rapidminer.operator.ModelApplier;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorChain;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.learner.Learner;
import com.rapidminer.operator.learner.functions.kernel.LibSVMLearner;
import com.rapidminer.tools.OperatorService;
import java.io.IOException;
/**
* An example program on how to use the word vector tool.
*
* @author Michael Wurst
* @version $Id$
*
*/
public class Test {
/*
public void SVMLearner(){
Learner learner = (Learner)OperatorService.createOperator(LibSVMLearner.class);
learner.
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_SVM_TYPE, new Integer(LibSVMLearner.SVM_TYPE_C_SVC).toString());
// ((Operator)learner).setParameter(LibSVMLearner.PARAMETER_KERNEL_TYPE, "0");//linear
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_EPSILON, "0.001");
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_C, "0.0");
// ((Operator)learner).setParameter(LibSVMLearner.PARAMETER_P, "0.1");
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_CONFIDENCE_FOR_MULTICLASS, "true");
model = learner.learn("c:/hjh.txt");
}*/
public static void main(String[] args) throws Exception {
// set properties to point to plugin directory
String pluginDirString = new File("D:\\Data\\Software\\Instalations\\RapidMiner5\\lib\\plugins").getAbsolutePath();
System.setProperty(RapidMiner.PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION, pluginDirString);
// EXAMPLE HOW TO CALL THE PROGRAM FROM JAVA
// Initialize the WVTool
WVTool wvt = new WVTool(false);
// Initialize the configuration
WVTConfiguration config = new WVTConfiguration();
final WVTStemmer dummyStemmer = new DummyStemmer();
final WVTStemmer porterStemmer = new PorterStemmerWrapper();
// mine->
// final WVTTokenizer pop = new NGramTokenizer(2,fdsa);
// <-mine , oare am pus bine acelasi wvtokenizer
config.setConfigurationRule(WVTConfiguration.STEP_STEMMER, new WVTConfigurationRule() {
public Object getMatchingComponent(WVTDocumentInfo d) {
if (d.getContentLanguage().equals("english"))
return porterStemmer;
else
return dummyStemmer;
}
});
WVTStemmer stemmer = new LovinsStemmerWrapper();
config.setConfigurationRule(WVTConfiguration.STEP_STEMMER, new WVTConfigurationFact(stemmer));
// Initialize the input list with two classes
WVTFileInputList list = new WVTFileInputList(2);
// Add entries
list.addEntry(new WVTDocumentInfo("D:/CrawOut/txt_sentoken/pos", "txt", "", "english", 0));
list.addEntry(new WVTDocumentInfo("D:/CrawOut/txt_sentoken/neg", "txt", "", "english", 1));
// Generate the word list
WVTWordList wordList = wvt.createWordList(list, config);
// Prune the word list
wordList.pruneByFrequency(2, 5);
// Alternativ I: read an already created word list from a file
// WVTWordList wordList2 =
// new WVTWordList(new FileReader("/home/wurst/tmp/wordlisttest.txt"));
// Alternative II: Use predifined dimensions
// List dimensions = new Vector();
// dimensions.add("atheist");
// dimensions.add("christian");
// wordList =
// wvt.createWordList(list, config, dimensions, false);
// Store the word list in a file
wordList.storePlain(new FileWriter("d:/CrawOut/wordlist.txt"));
// WordList sd;
// Create the word vectors
// Set up an output filter (write sparse vectors to a file)
FileWriter outFile = new FileWriter("d:/CrawOut/wv.txt");
WordVectorWriter wvw = new WordVectorWriter(outFile, true);
config.setConfigurationRule(WVTConfiguration.STEP_OUTPUT, new WVTConfigurationFact(wvw));
config.setConfigurationRule(WVTConfiguration.STEP_VECTOR_CREATION, new WVTConfigurationFact(new TFIDF()));
WVTWordVector s;
// Create the vectors
wvt.createVectors(list, config, wordList);
Learner learner = (Learner)OperatorService.createOperator(LibSVMLearner.class);
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_SVM_TYPE, new Integer(LibSVMLearner.SVM_TYPE_C_SVC).toString());
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_KERNEL_TYPE, "0");//linear
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_EPSILON, "0.001");
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_C, "0.0");
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_P, "0.1");
((Operator)learner).setParameter(LibSVMLearner.PARAMETER_CONFIDENCE_FOR_MULTICLASS, "true");
ExampleSet exampleSets;
exampleSets = (ExampleSet) wvw ;
Model model = learner.learn(exampleSets);
// Close the output file
wvw.close();
outFile.close();
// Just for demonstration: Create a vector from a String
WVTWordVector q = wvt.createVector("cmu harvard net", wordList);
}
}
/*import edu.udo.*;
import edu.udo.cs.wvtool.main.WVTDocumentInfo;
import edu.udo.cs.wvtool.main.WVTFileInputList;
public class Test {
public static void main(String[] args){
WVTFileInputList list = new WVTFileInputList(2);
list.addEntry(
new WVTDocumentInfo("D:/CrawOut/txt_sentoken/pos",
"txt","","english",0));
list.addEntry(
new WVTDocumentInfo("D:/CrawOut/txt_sentoken/neg",
"txt","","english",1));
list.
}
}
*/
Exception in thread "main" com.rapidminer.operator.OperatorCreationException: No operator description object given for 'com.rapidminer.operator.learner.functions.kernel.LibSVMLearner'
at com.rapidminer.tools.OperatorService.createOperator(OperatorService.java:564)
at Test.main(Test.java:137)
0
Answers
-
for the separate method i have this code, where i try with the input of a wordvectorfile wvw.txt or an File-Object exampleset.ioo (from rapidminer gui output "Writer" component )
in my oppinion i have some problems with cast from wordvector to exampleset, but i don't know what else to do.
and i have this output:
package lrn09;
import com.rapidminer.RapidMiner;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.Model;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.io.ExampleSource;
import com.rapidminer.operator.learner.Learner;
import com.rapidminer.operator.learner.functions.kernel.LibSVMLearner;
import com.rapidminer.operator.text.io.Document2ExampleSet;
import com.rapidminer.operator.text.io.filereader.FileReader;
import com.rapidminer.tools.OperatorService;
import java.io.*;
public class LearnerSVM09 {
public static void main(String[] args){
/*ExampleSource sd;
FileReader ds;
File sds;
try{
sds = new File("");
String wvw;
ds.readFile(sds, true ,java.nio.charset.Charset.defaultCharset());
// sd.read();*/
LearnerSVM09 tr = new LearnerSVM09(new File("d:/CrawOut/Exampleset.ioo"));
}
public LearnerSVM09(File wvw){
System.out.println("1");
String pluginDirString = new File("D:\\Data\\Software\\Instalations\\RapidMiner5\\lib\\plugins").getAbsolutePath();
System.setProperty(RapidMiner.PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION, pluginDirString);
RapidMiner.init();
System.out.println("1");
Document2ExampleSet trans;
try{
System.out.println("1");
Learner learner = (Learner)OperatorService.createOperator(LibSVMLearner.class);
System.out.println("1");
// ((Operator)learner).setParameter(LibSVMLearner.PARAMETER_SVM_TYPE, new Integer(LibSVMLearner.SVM_TYPE_C_SVC).toString());
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_KERNEL_TYPE, "0");//linear
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_EPSILON, "0.001");
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_C, "0.0");
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_P, "0.1");
//((Operator)learner).setParameter(LibSVMLearner.PARAMETER_CONFIDENCE_FOR_MULTICLASS, "true");
ExampleSet exampleSets;
System.out.println("2");
exampleSets = (ExampleSet) wvw ;
System.out.println("3");
Model model = learner.learn((ExampleSet) wvw);
System.out.println("Result");
System.out.println(model.toResultString());
}catch(Exception e){
}
}
}1
2011-06-10 08:15:40 CONFIG: Locale not specified explicitly. Set default locale to US. (RapidMiner.init())
2011-06-10 08:15:41 CONFIG: Initializing I18N (RapidMiner.splashMessage())
2011-06-10 08:15:41 CONFIG: Ensuring RapidMiner Home is set (RapidMiner.splashMessage())
2011-06-10 08:15:41 INFO: Property rapidminer.home is not set. Guessing. (Launcher.ensureRapidMinerHomeSet())
2011-06-10 08:15:41 INFO: Trying parent directory of 'C:\Users\tssyspy\Desktop\Licenta\launcher.jar'...gotcha! (Launcher.ensureRapidMinerHomeSet())
2011-06-10 08:15:41 INFO: Trying parent directory of 'C:\Users\tssyspy\Desktop\Licenta\rapidminer.jar'...gotcha! (Launcher.ensureRapidMinerHomeSet())
2011-06-10 08:15:41 CONFIG: Reading Configuration Files (RapidMiner.splashMessage())
2011-06-10 08:15:41 CONFIG: Reading configuration resource com/rapidminer/resources/rapidminerrc. (ParameterService.loadAllRCFiles())
2011-06-10 08:15:41 CONFIG: Execution mode UNKNOWN does not permit file access. Ignoring all rcfiles. (ParameterService.loadAllRCFiles())
2011-06-10 08:15:41 CONFIG: Registering Plugins (RapidMiner.splashMessage())
2011-06-10 08:15:41 CONFIG: Read extension state. (ManagedExtension.readConfiguration())
2011-06-10 08:15:41 CONFIG: Scanning plugins in \Data\Software\Instalations\RapidMiner5\lib\plugins. (Plugin.findAndRegisterPlugins())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'Text Processing'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:/C:/Users/tssyspy/Desktop/Licenta/rapidminer-Text%20Processing-5.0.007.jar!/com/rapidminer/resources/parserulesTextProcessing.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'PMML'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_pmml-5.0.2.jar!/com/rapidminer/resources/parserulesPMML.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'Weka'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/parserulesWekaExtension.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'R Extension'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_r-5.0.2.jar!/com/rapidminer/resources/parserulesR.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'PaREn Wizard'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_paren-5.0.1.jar!/com/rapidminer/resources/parserulesParen.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'Web Mining'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_web-5.0.4.jar!/com/rapidminer/resources/parserulesWeb.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'Reporting'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_reporting-5.0.2.jar!/com/rapidminer/resources/parserulesReporting.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Loading renderers from 'Series'. (RendererService.init())
2011-06-10 08:15:41 CONFIG: Reading parse rules from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/parserulesValueSeries.xml (XMLImporter.importParseRules())
2011-06-10 08:15:41 CONFIG: Initializing Operators (RapidMiner.splashMessage())
2011-06-10 08:15:41 CONFIG: Loading operators from 'OperatorsCore.xml'. (OperatorService.registerOperators())
2011-06-10 08:15:41 CONFIG: Loading operator documentation from jar:file:/C:/Users/tssyspy/Desktop/Licenta/rapidminer.jar!/com/rapidminer/resources/i18n/OperatorsCoreDocumentation.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:43 WARNING: Password in XML file looks like unencrypted plain text. (ParameterTypePassword.decryptPassword())
2011-06-10 08:15:45 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_text-5.0.7.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:45 CONFIG: Loading operator documentation from jar:file:/C:/Users/tssyspy/Desktop/Licenta/rapidminer-Text%20Processing-5.0.007.jar!/com/rapidminer/resources/i18n/OperatorsDocTextProcessing.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:45 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_parallel-5.0.1.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:45 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_parallel-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocParallel.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:45 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_pmml-5.0.2.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:45 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_pmml-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocPMML.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:45 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_weka-5.0.1.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:45 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocWekaExtension.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:45 CONFIG: Creating operators from factory com.rapidminer.tools.WekaOperatorFactory (OperatorService.parseOperators())
2011-06-10 08:15:48 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_r-5.0.2.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_r-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocR.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:48 CONFIG: Creating operators from factory com.rapidminer.operator.r.ROperatorFactory (OperatorService.parseOperators())
2011-06-10 08:15:48 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_paren-5.0.1.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_paren-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocParen.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:48 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_web-5.0.4.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_web-5.0.4.jar!/com/rapidminer/resources/i18n/OperatorsDocWeb.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:48 INFO: No operator descriptor specified for plugin Community. Trying plugin initializtation class com.rapidminer.community.CommunityPluginInit. (Plugin.registerOperators())
2011-06-10 08:15:48 WARNING: No operator descriptor defined for: Community (Plugin.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_reporting-5.0.2.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_reporting-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocReporting.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:48 CONFIG: Loading operators from 'C:\Users\tssyspy\.RapidMiner5\managed\rmx_series-5.0.2.jar'. (OperatorService.registerOperators())
2011-06-10 08:15:48 CONFIG: Loading operator documentation from jar:file:C:\Users\tssyspy\.RapidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocValueSeries.xml. (OperatorDocBundle$XMLControl.newBundle())
2011-06-10 08:15:48 CONFIG: Number of registered operator classes: 581; number of registered operator descriptions: 721; number of replacements: 533 (OperatorService.init())
2011-06-10 08:15:48 CONFIG: Cannot access file system. Bypassing loading of operator usage statistics. (UsageStatistics.load())
2011-06-10 08:15:48 CONFIG: Initializing XML Transformation Rules (RapidMiner.splashMessage())
2011-06-10 08:15:48 CONFIG: Reading parse rules from jar:file:/C:/Users/tssyspy/Desktop/Licenta/rapidminer.jar!/com/rapidminer/resources/parserules.xml (XMLImporter.importParseRules())
2011-06-10 08:15:48 CONFIG: Loading JDBC Drivers (RapidMiner.splashMessage())
2011-06-10 08:15:48 CONFIG: Loading JDBC driver information from 'resource jdbc_properties.xml'. (DatabaseService.loadJDBCProperties())
2011-06-10 08:15:48 INFO: JDBC driver com.mysql.jdbc.Driver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver org.postgresql.Driver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver org.hsqldb.jdbcDriver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 WARNING: Missing database driver class name for 'ODBC Bridge (e.g. Access)' (JDBCProperties.<init>())
2011-06-10 08:15:48 INFO: JDBC driver net.sourceforge.jtds.jdbc.Driver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver com.ingres.jdbc.IngresDriver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
2011-06-10 08:15:48 CONFIG: Ignoring jdbc_properties.xml files in execution mode UNKNOWN. (DatabaseService.init())
2011-06-10 08:15:48 CONFIG: Initializing Data Repository (RapidMiner.splashMessage())
2011-06-10 08:15:48 INFO: Cannot access file system in execution mode UNKNOWN. Not loading repositories. (RepositoryManager.load())
2011-06-10 08:15:48 CONFIG: Initializing XML Serialization (RapidMiner.splashMessage())
2011-06-10 08:15:49 CONFIG: Defining XML Serialization Alias Pairs (RapidMiner.splashMessage())
2011-06-10 08:15:49 CONFIG: Initializing Renderers (RapidMiner.splashMessage())
2011-06-10 08:15:49 CONFIG: Loading renderers from 'file:/C:/Users/tssyspy/Desktop/Licenta/rapidminer.jar!/com/rapidminer/resources/ioobjects.xml'. (RendererService.init())
2011-06-10 08:15:49 CONFIG: Loading renderers from 'ioobjects.xml'. (RendererService.init())
1
1
1
20 -
Hi,
first make sure before using RapidMiner to call this code fragment, otherwise you will not be able to use RapidMiner.RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
In regards to your second post: You're catching an Exception without any output, so nobody can know what possibly went wrong..
RapidMiner.init();
However, you cannot cast from File to ExampleSet, that cannot work.
Use this (you will need to adapt the method to actually get the InputStream, either by changing the location of the file or by creating an InputStream from your d:\CrawOut\Exampleset.ioo file yourself):IOObject operatorUsageDataObject = (IOObject)IOObjectSerializer.getInstance().deserialize(this.getClass().getResourceAsStream("/lrn09/resources/Exampleset.ioo"));
Regards,
ExampleSet dataSet = (ExampleSet)operatorUsageDataObject;
Marco0