Hi all,
Although I sent the mail to Piotr, the author of FSelector, it should be better
to ask here to let others know.
Yanwei
Begin forwarded message:
From: Yanwei Song <yanwei.song@gmail.com>
Date: September 7, 2011 4:41:58 PM EDT
To: p.romanski@stud.elka.pw.edu.pl
Subject: FSelector and RWeka problem
Dear Piotr,
Thanks for developing the FSelector package for us. I'm a new R beginner,
and trying to use R to do some machine learning related research.
Here is the problem I found:
I was trying to combine RWeka and FSelector, and do the forward feature
selection with J48/C5.4 decision tree:
Here is the code:
#=================library(RWeka)
library(FSelector)
library(rpart)
data(iris)
evaluator <- function(subset) {
p <- J48(as.simple.formula(subset, "Species"), data=iris)
e <- evaluate_Weka_classifier(p)
print(subset)
print(e$details[1])
return(e$details[1])
}
subset <- forward.search(names(iris)[-5], evaluator)
========================I got this error, when I ran it:
Error in paste(attributes, sep = "", collapse = " + ") :
cannot coerce type 'closure' to vector of type 'character'
Not sure if you can help me out, I was stuck by this for a whole day as a
beginner.
Thanks
Best Regards,
Yanwei
[[alternative HTML version deleted]]