{"action":"closed","issue":{"url":"https://api.github.com/repos/berndbischl/mlr/issues/280","labels_url":"https://api.github.com/repos/berndbischl/mlr/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/berndbischl/mlr/issues/280/comments","events_url":"https://api.github.com/repos/berndbischl/mlr/issues/280/events","html_url":"https://github.com/berndbischl/mlr/issues/280","id":68698224,"number":280,"title":"makeDiscreteParam for \"ntree\", CV for F-racing","user":{"login":"zygmuntz","id":1714767,"avatar_url":"https://avatars.githubusercontent.com/u/1714767?v=3","gravatar_id":"","url":"https://api.github.com/users/zygmuntz","html_url":"https://github.com/zygmuntz","followers_url":"https://api.github.com/users/zygmuntz/followers","following_url":"https://api.github.com/users/zygmuntz/following{/other_user}","gists_url":"https://api.github.com/users/zygmuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/zygmuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zygmuntz/subscriptions","organizations_url":"https://api.github.com/users/zygmuntz/orgs","repos_url":"https://api.github.com/users/zygmuntz/repos","events_url":"https://api.github.com/users/zygmuntz/events{/privacy}","received_events_url":"https://api.github.com/users/zygmuntz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-15T14:33:30Z","updated_at":"2015-04-30T23:13:41Z","closed_at":"2015-04-30T23:13:41Z","body":"I get the following error when attempting to tune _ntree_ in random forest as a discrete param:\r\n\r\n\tmakeDiscreteParam( \"ntree\", values = c( 100, 200, 300, 400, 500 ))\r\n\r\n\t[Tune-x] Setting hyperpars failed: Error in setHyperPars2.Learner(learner$base.learners[[z$ind]], par.vals = setNames(par.vals[i],  : \r\n\t  200 is not feasible for parameter 'ntree'!\r\n\r\nHere's my code:\r\n\r\n\tlibrary( mlr )\r\n\r\n\t# setwd...\r\n\r\n\ttrain = read.csv( 'data/train.csv' )\r\n\r\n\tdata = train[,4:ncol( train )]\r\n\tdata = data[data$Type != 'DT',]\r\n\tdata$revenue = log( data$revenue )\r\n\r\n\ttask = makeRegrTask( 'restaurants', data, 'revenue' )\r\n\r\n\tlearners = list(\r\n\t\tmakeLearner( \"regr.ksvm\" ),\r\n\t\tmakeLearner( \"regr.randomForest\" ),\r\n\t\tmakeLearner( \"regr.lm\" )\r\n\t)\r\n\r\n\tmultiplexer = makeModelMultiplexer( learners )\r\n\r\n\tparams = makeModelMultiplexerParamSet( multiplexer,\r\n\t\tregr.ksvm = makeParamSet(\r\n\t\t\tmakeNumericParam( \"sigma\", lower = -12, upper = 12, trafo = function(x) 2^x )\r\n\t\t),\r\n\t\tregr.randomForest = makeParamSet(\r\n\t\t\t# makeDiscreteParam( \"ntree\", values = c( 100, 200, 300, 400, 500 ))\r\n\t\t\tmakeIntegerParam( \"ntree\", lower = 10, upper = 500 )\r\n\t\t)\r\n\t)\r\n\r\n\tresampler = makeResampleDesc( \"CV\", iters = 5 )\r\n\r\n\ttuner = makeTuneControlIrace( maxExperiments = 200 )\r\n\r\n\tres = tuneParams( multiplexer, task, resampler, par.set = params, control = tuner, measures = list( rmse ), show.info = T )\r\n\r\n\tprint( head( as.data.frame( res$opt.path )))\r\n\r\n\r\nI'm using data from Restaurant Revenue Prediction competition at Kaggle:\r\nhttp://www.kaggle.com/c/restaurant-revenue-prediction\r\n\r\nThis set has only ~140 training examples, so I'd like to use CV. Bernd tells me I should use holdout instead, as mlr won't understand CV in this case (with Irace? why?).\r\n"}}