Error in UseMethod("train")

442 views
Skip to first unread message

AgnieszkaGS

unread,
Apr 21, 2020, 7:53:49 AM4/21/20
to rregrs
I have R-3.6.1, installed RRegrs according to readme file from github (Caret Package version 6.0.52). I've tried use RRegrs() function on default housing data-set:

models<-RRegrs(DataFileName="ds.House.csv", PathDataSet="House", noCores=4, iSplitTimes=2, noYrand=2)

but getting error as shown below:

-> Loading original dataset ...
      --->  ds.House.csv 
-> Removal of near zero variance columns ...
-> Scaling original dataset ...
-> Removing correlated features ...
                  -> CPU Cores =  4 (only complex methods)
-> Splitting dataset in Training and Test sets ...
--> Split No. 1 from 2 
-> LM : Linear Multi-regression ...
    --> repeatedcv 
Error in UseMethod("train") : 
  no applicable method for 'train' applied to an object of class "formula"

How can I fix this?
Screen Shot 2020-04-21 at 13.52.26.png

Georgia Tsiliki

unread,
Apr 21, 2020, 11:47:41 AM4/21/20
to rregrs
Hello,
Works fine for me- can you try running only 2 or 3 models say? e.g.
> models<-RRegrs(DataFileName="ds.House.csv", PathDataSet="House",
 noCores=2, iSplitTimes=2, noYrand=2,fGLM=F,fPLS=F,fLASSO=F,fSVRM=F,fNN=F,fRF=F,fRFRFE=F)

Rahul Kumar

unread,
Feb 10, 2023, 10:38:55 AM2/10/23
to rregrs
Hi Everyone, 

Nice to be a part of this group. I have been facing a " no applicable method for 'train' applied to an object of class "formula" error while using RRegrs package. I tried downgrading caret package to "6.0-52", and tried with one-two model only but with no success.

Can somebody please help.

Thank you.

Reply all
Reply to author
Forward
0 new messages