mlr: creating plotBMRBoxplots for only one of the learner

does anyone know whether it is possible to create the plots integrated in the mlr package for only one of the learners?

For example:

BMR_Boxplot <- plotBMRBoxplots(bmr, measure = mse) 
BMR_Boxplot

Looking at the arguments, I don't see the possibility to choose one specific learner - is there any known workaround?

Many thanks!

1 answer

  • answered 2019-02-11 08:54 PhilippPro

    If you subset your bmr object to the results of only one learner, it is easily possible.

    Maybe would be nice to have this as feature. Example code for subsetting to the first learner:

    lrns = list(makeLearner("classif.lda"), makeLearner("classif.rpart"))
    tasks = list(iris.task, sonar.task)
    rdesc = makeResampleDesc("CV", iters = 5L)
    meas = list(acc, ber)
    bmr = benchmark(lrns, tasks, rdesc, measures = meas)
    bmr$results[[2]] = NULL
    bmr$learners[[2]] = NULL
    plotBMRBoxplots(bmr, ber, style = "violin")