Pages: [1]
  Print  
Author Topic: error running R operator in RM  (Read 75 times)
dfc2000
Newbie
*
Posts: 1


« on: July 21, 2014, 08:02:36 PM »

Hello,

I installed R extension and I am trying to get R classification operators (e.g. Naive Bayes) to work. However I got this error when running the process. Any idea? Don't know which package make.task comes from. The R console seems to work fine.

Jul 21, 2014 2:53:56 PM INFO: No filename given for result file, using stdout for logging results!
Jul 21, 2014 2:53:56 PM INFO: Process //myLocalRepository/process-dsa-cmt starts
Jul 21, 2014 2:53:57 PM INFO: Loading initial data.
Jul 21, 2014 2:53:57 PM INFO: Naive Bayes: Error: could not find function "make.task"

Jul 21, 2014 2:53:57 PM INFO: Naive Bayes: Error in serialize(rm.data.model, NULL) :
  object 'rm.data.model' not found

Jul 21, 2014 2:53:57 PM INFO: Naive Bayes: Error in print(rm.data.model) : object 'rm.data.model' not found


More info --
I found "make.task" call in com\rapidminer\resources\r\defaultOperators.xml from rmx_r-5.3.0.jar:

<learner name="r.classification.naive_bayes">
      <!--
         This is the code for the learning of the model. The train data is delivered as variable called "rm.data.train". The label and the weight attribute are called
         "rm.data.train.label", respectively "rm.data.train.weight". Weights may not be defined! The resulting model must be saved as "rm.data.model".
      -->
      <code>
         library(mlr);
         if (exists("rm.data.train.weight")){
            ct &lt;- make.task(data = rm.data.train, target = rm.data.train.label, excluded = rm.data.train.weight, weights = rm.data.train.weight)};
         if (!exists("rm.data.train.weight")){
            ct &lt;- make.task(data = rm.data.train, target = rm.data.train.label)
         }
         rm.data.model &lt;- train("classif.naiveBayes", ct);
      </code>
      <!--
         This is the code for applying the model on a new data set. This data frame has already been ensured, that the signature is exactly equal to what has been delivered above.
         The data us delivered in "rm.data.apply", while the model is stored in "rm.data.model". The results have to be stored in "rm.data.result".
      -->
      <apply>
         library(mlr);
         rm.data.result &lt;- as.data.frame(predict(rm.data.model, newdata = rm.data.apply, type="prob"));   
      </apply>
      <capabilities>
         <capability>NUMERICAL_ATTRIBUTES</capability>
         <capability>POLYNOMINAL_LABEL</capability>
         <capability>BINOMINAL_LABEL</capability>
      </capabilities>
   </learner>

This seems to be a mismatch since I believe the current version (2.1) of mlr package uses method "makeClassifTask" instead.

Is there a newer (>5.3.0) version of R extension?
« Last Edit: July 23, 2014, 03:40:05 PM by dfc2000 » Logged
Pages: [1]
  Print  
 
Jump to: