Search code examples
rmlr

List Learners in Mlr including Unistalled Ones


I want to get a list of all clustering algorithms integrated in the mlr package. I excpected this code to return them, but it excludes the uninstalled ones:

library(mlr)
listLearners("cluster") # default: create=F, check.packages=F

Instead I get the following warning:

Warning in listLearners.character("cluster") :
  The following learners could not be constructed, probably because their packages are not installed:
classif.ada,classif.bartMachine,classif.bdk,classif.blackboost,classif.boosting,classif.bst,classif.C50,classif.clusterSVM,classif.cvglmnet,classif.dbnDNN,classif.dcSVM,classif.earth,classif.evtree,classif.extraTrees,classif.fnn,classif.gamboost,classif.gaterSVM,classif.geoDA,classif.glmboost,classif.glmnet,classif.hdrda,classif.kknn,classif.LiblineaRL1L2SVC,classif.LiblineaRL1LogReg,classif.LiblineaRL2L1SVC,classif.LiblineaRL2LogReg,classif.LiblineaRL2SVC,classif.LiblineaRMultiClassSVC,classif.linDA,classif.lqa,classif.mda,classif.mlp,classif.neuralnet,classif.nnTrain,classif.nodeHarvest,classif.pamr,classif.penalized.fusedlasso,classif.penalized.lasso,classif.penalized.ridge,classif.plr,classif.quaDA,classif.randomForestSRC,classif.ranger,classif.rda,classif.rFerns,classif.rknn,classif.rotationForest,classif.RRF,classif.rrlda,classif.saeDNN,classif.sda,classif.sparseLDA,classif.xgboost [... truncated]

Am I doing something wrong or is this function broken?


Solution

  • The default of check.packages is actually TRUE when you pass a string. Just set it to FALSE and everything should work:

    listLearners("cluster", check.packages = FALSE)