nnetmlr3

How I include learners in mlr3


I am using rpart library in mlr3, but when I am changing it to other learners like nnet, it gives me error that not found in DictionaryLearner. In my code, only rpart is working and all other learners like nnet, svm gives error.

I am using the following code

library(mlr3)
library(mlr3tuning)
library(paradox)


df=readARFF("nasa93.arff")
task=TaskRegr$new("df", df, target = "act_effort") 
#task = tsk("pima")
#learner = lrn("classif.rpart")
learner= lrn("regr.rpart")

Solution

  • You can find all available learners in the mlr_learners dictionary (which is where the lrn() command will look them up). mlr3 only comes with a basic set of learners; additional ones are available when you load the mlr3learners and mlr3extralearners packages.