{"action":"closed","issue":{"url":"https://api.github.com/repos/berndbischl/mlr/issues/254","labels_url":"https://api.github.com/repos/berndbischl/mlr/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/berndbischl/mlr/issues/254/comments","events_url":"https://api.github.com/repos/berndbischl/mlr/issues/254/events","html_url":"https://github.com/berndbischl/mlr/issues/254","id":60199659,"number":254,"title":"Setting rpart options for classif.ada","user":{"login":"phASL","id":9842170,"avatar_url":"https://avatars.githubusercontent.com/u/9842170?v=3","gravatar_id":"","url":"https://api.github.com/users/phASL","html_url":"https://github.com/phASL","followers_url":"https://api.github.com/users/phASL/followers","following_url":"https://api.github.com/users/phASL/following{/other_user}","gists_url":"https://api.github.com/users/phASL/gists{/gist_id}","starred_url":"https://api.github.com/users/phASL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phASL/subscriptions","organizations_url":"https://api.github.com/users/phASL/orgs","repos_url":"https://api.github.com/users/phASL/repos","events_url":"https://api.github.com/users/phASL/events{/privacy}","received_events_url":"https://api.github.com/users/phASL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"berndbischl","id":1225974,"avatar_url":"https://avatars.githubusercontent.com/u/1225974?v=3","gravatar_id":"","url":"https://api.github.com/users/berndbischl","html_url":"https://github.com/berndbischl","followers_url":"https://api.github.com/users/berndbischl/followers","following_url":"https://api.github.com/users/berndbischl/following{/other_user}","gists_url":"https://api.github.com/users/berndbischl/gists{/gist_id}","starred_url":"https://api.github.com/users/berndbischl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berndbischl/subscriptions","organizations_url":"https://api.github.com/users/berndbischl/orgs","repos_url":"https://api.github.com/users/berndbischl/repos","events_url":"https://api.github.com/users/berndbischl/events{/privacy}","received_events_url":"https://api.github.com/users/berndbischl/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-03-07T09:46:06Z","updated_at":"2015-05-04T11:27:45Z","closed_at":"2015-05-04T11:27:45Z","body":"Setting rpart options for ```classif.ada``` via ```par.vals``` or directly e.g. as ```maxdepth``` argument is not possible:\r\n```R\r\nlibrary(\"mlr\")\r\n\r\nparam = list(maxdepth = 5)\r\nlrn.ada = makeLearner(\"classif.ada\", par.vals = param)\r\ntrain(lrn.ada, sonar.task)\r\n# Error in ada.default(x, y, ..., na.action = na.action) : \r\n#   Error:  Argument maxdepth not matched\r\n\r\nlrn.ada = makeLearner(\"classif.ada\", maxdepth = 5)\r\ntrain(lrn.ada, sonar.task)\r\n# Error in ada.default(x, y, ..., na.action = na.action) : \r\n#   Error:  Argument maxdepth not matched\r\n```\r\nYou can use a trick: Set the mlr option ```on.par.without.desc``` to \"warn\" and use the ```...``` argument:\r\n\r\n```R\r\nparam = list(maxdepth = 5)\r\n# also possible: param = rpart.control(maxdepth = 5)\r\n\r\nconfigureMlr(on.par.without.desc = \"warn\")\r\nlrn.ada = makeLearner(\"classif.ada\", ... = param)\r\n# Warning message:\r\n# In setHyperPars2.Learner(learner, insert(par.vals, args)) :\r\n# classif.ada: Setting parameter ... without available description object!\r\n# You can switch off this check by using configureMlr!\r\n\r\ntrain(lrn.ada, sonar.task)\r\n# Model for id = classif.ada class = classif.ada\r\n# Trained on obs: 208\r\n# Used features: 60\r\n# Hyperparameters: ...=<list>\r\n```\r\n\r\nThe problem is that ```ada()``` requires a named list for the rpart options, so I think it's a better solution to insert some code in ```trainLearner.classif.ada```, just like the [ctrl argument] (https://github.com/berndbischl/mlr/blob/0eec258c8b5e39691aeaf229e647ca0796e64435/R/RLearner_classif_boosting.R#L34) in ```trainLearner.classif.boosting```."}}