The mlr package provides a unified interface for supervised and unsupervised machine learning in R, covering task creation, learner configuration, resampling, performance measurement, hyperparameter tuning, and visualization. It supports classification, regression, clustering, survival, and cost-sensitive tasks.
What’s covered#
- Setup –
normalizeFeatures(),createDummyFeatures(),mergeSmallFactorLevels() - Task creation –
makeClassifTask(),makeRegrTask(),makeClusterTask(),makeSurvTask() - Training & testing –
makeLearner(),train(),predict(),performance(),listMeasures() - Resampling –
makeResampleDesc()for CV, LOO, RepCV, bootstrap, and holdout;resample() - Refining performance –
makeParamSet(),makeTuneControl*(),tuneParams() - Configuration –
configureMlr()for error handling and output verbosity - Feature extraction –
filterFeatures()with importance-based selection methods - Visualization –
plotThreshVsPerf(),plotROCCurves(),plotResiduals() - Wrappers –
makeDummyFeaturesWrapper(),makeImputeWrapper(),makePreprocWrapper()