Session Ready
Exercise

Define aggregated measures

Now, you are going to define performance measures. The knowledge_train_data dataset has already been loaded for you, as have the packages mlr and tidyverse. And the following code has also been run:

task <- makeClassifTask(data = knowledge_train_data, 
                        target = "UNS")

lrn <- makeLearner(cl = "classif.nnet", fix.factors.prediction = TRUE)

param_set <- makeParamSet(
  makeIntegerParam("size", lower = 1, upper = 5),
  makeIntegerParam("maxit", lower = 1, upper = 300),
  makeNumericParam("decay", lower = 0.0001, upper = 1)
)

ctrl_random <- makeTuneControlRandom(maxit = 10)
Instructions
100 XP
  • Use the setAggregation function, which aggregates the standard deviation of performance metrics.
  • Apply setAggregation to the mean misclassification error and accuracy after resampling.
  • Optimize your model by mean misclassification error. Remember that the first argument is used for optimization.