开发者

Using meta learning in RWeka

开发者 https://www.devze.com 2023-02-20 01:24 出处:网络
I used RWeka to call Weka functions directly in R. I tried using meta learning (bagging) but failed. My code is Bagging(classLabel ~ ., data = train, control = Weka_control(W = J48))

I used RWeka to call Weka functions directly in R.

I tried using meta learning (bagging) but failed.

My code is Bagging(classLabel ~ ., data = train, control = Weka_control(W = J48)) However, the following error pops up:

Error in Bagging(classLabel ~ ., data = train, control = Weka_control(W = J48)) : 
  unused argument(s) (data = train, control = Weka_control(W = J48))

I also tri开发者_JS百科ed several different base learners but always met such error.

If you successfully used meta learning in RWeka before, please let me know.


Just tried another writing:

optns <- Weka_control(W = "weka.classifiers.trees.REPTree") Bagging <- make_Weka_classifier("weka/classifiers/meta/Bagging") model <- Bagging(classLabel ~ ., data=dat, control = optns)

Surprisingly the R code works now. -Credit Leo5188

0

精彩评论

暂无评论...
验证码 换一张
取 消