mlr v2.19.0


Monthly downloads



Machine Learning in R

Interface to a large number of classification and regression techniques, including machine-readable parameter descriptions. There is also an experimental extension for survival analysis, clustering and general, example-specific cost-sensitive learning. Generic resampling, including cross-validation, bootstrapping and subsampling. Hyperparameter tuning with modern optimization techniques, for single- and multi-objective problems. Filter and wrapper methods for feature selection. Extension of basic learners with additional operations common in machine learning, also allowing for easy nested resampling. Most operations can be parallelized.

Functions in mlr

Name Description
Task Create a classification, regression, survival, cluster, cost-sensitive classification or multilabel task.
Aggregation Aggregation object.
BenchmarkResult BenchmarkResult object.
TaskDesc Description object for task.
makeSurvTask Create a survival task.
ResampleResult ResampleResult object.
agri.task European Union Agricultural Workforces clustering task.
makeCostSensTask Create a cost-sensitive classification task.
ConfusionMatrix Confusion matrix
Prediction Prediction object.
RLearner Internal construction / wrapping of learner object.
analyzeFeatSelResult Show and visualize the steps of feature selection.
TuneMultiCritResult Result of multi-criteria tuning.
addRRMeasure Compute new measures for existing ResampleResult
aggregations Aggregation methods.
calculateConfusionMatrix Confusion matrix.
calculateROCMeasures Calculate receiver operator measures.
TuneResult Result of tuning.
createDummyFeatures Generate dummy variables for factor features.
convertMLBenchObjToTask Convert a machine learning benchmark / demo object from package mlbench to a task.
costiris.task Iris cost-sensitive classification task.
FeatSelResult Result of feature selection.
MeasureProperties Query properties of measures.
LearnerProperties Query properties of learners.
makeClassifTask Create a classification task.
checkPredictLearnerOutput Check output returned by predictLearner.
makeMultilabelTask Create a multilabel task.
checkLearner Exported for internal use only.
makeClusterTask Create a cluster task.
makeRegrTask Create a regression task.
createSpatialResamplingPlots Create (spatial) resampling plot objects.
extractFDAMultiResFeatures Multiresolution feature extraction.
dropFeatures Drop some features of task.
extractFDATsfeatures Time-Series Feature Heuristics
estimateRelativeOverfitting Estimate relative overfitting.
extractFDAWavelets Discrete Wavelet transform features.
filterFeatures Filter features by thresholding filter values.
getBMRFeatSelResults Extract the feature selection results from a benchmark result.
generateLearningCurveData Generates a learning curve.
TuneControl Control object for tuning
fuelsubset.task FuelSubset functional data regression task.
generatePartialDependenceData Generate partial dependence.
generateThreshVsPerfData Generate threshold vs. performance(s) for 2-class classification.
getBMRAggrPerformances Extract the aggregated performance values from a benchmark result.
getBMRTaskIds Return task ids used in benchmark.
getBMRFilteredFeatures Extract the feature selection results from a benchmark result.
getBMRTuneResults Extract the tuning results from a benchmark result.
getHyperPars Get current parameter settings for a learner.
generateCalibrationData Generate classifier calibration data.
getFunctionalFeatures Get only functional features from a task or a data.frame.
getHomogeneousEnsembleModels Deprecated, use getLearnerModel instead.
ResamplePrediction Prediction from resampling.
getLearnerPackages Get the required R packages of the learner.
capLargeValues Convert large/infinite numeric values in a data.frame or task.
TuneMultiCritControl Create control structures for multi-criteria tuning.
getLearnerParVals Get the parameter values of the learner.
getOOBPreds Extracts out-of-bag predictions from trained models.
getRRDump Return the error dump of ResampleResult.
getTaskTargets Get target data of task.
getRRPredictionList Get list of predictions for train and test set of each single resample iteration.
getOOBPredsLearner Provides out-of-bag predictions for a given model and the corresponding learner.
getCaretParamSet Get tuning parameters from a learner of the caret R-package.
getClassWeightParam Get the class weight parameter of a learner.
getLearnerParamSet Get the parameter set of the learner.
getLearnerPredictType Get the predict type of the learner.
getPredictionProbabilities Get probabilities for some classes.
getTaskType Get the type of the task.
changeData Change Task Data
getLearnerId Get the ID of the learner.
getMultilabelBinaryPerformances Retrieve binary classification measures for multilabel classification predictions.
getNestedTuneResultsOptPathDf Get the opt.paths from each tuning step from the outer resampling.
getMlrOptions Returns a list of mlr's options.
getRRTaskDescription Get task description from resample results (DEPRECATED).
getNestedTuneResultsX Get the tuned hyperparameter settings from a nested tuning.
getResamplingIndices Get the resampling indices from a tuning or feature selection wrapper..
isFailureModel Is the model a FailureModel?
joinClassLevels Join some class existing levels to new, larger class levels for classification problems.
lung.task NCCTG Lung Cancer survival task.
listTaskTypes List the supported task types in mlr
getTaskDesc Get a summarizing task description.
getTaskDescription Deprecated, use getTaskDesc instead.
getPredictionResponse Get response / truth from prediction object.
FailureModel Failure model.
hasFunctionalFeatures Check whether the object contains functional features.
gunpoint.task Gunpoint functional data classification task.
asROCRPrediction Converts predictions to a format package ROCR can handle.
batchmark Run machine learning benchmarks as distributed experiments.
listFilterEnsembleMethods List ensemble filter methods.
FeatSelControl Create control structures for feature selection.
downsample Downsample (subsample) a task or a data.frame.
crossover Crossover.
listFilterMethods List filter methods.
getTuneResult Returns the optimal hyperparameters and optimization path after training.
bc.task Wisconsin Breast Cancer classification task.
benchmark Benchmark experiment for multiple learners and tasks.
makeAggregation Specify your own aggregation of measures.
makeFilter Create a feature filter.
generateCritDifferencesData Generate data for critical-differences plot.
extractFDAFPCA Extract functional principal component analysis features.
extractFDADTWKernel DTW kernel features
generateFeatureImportanceData Generate feature importance.
getTuneResultOptPath Get the optimization path of a tuning result.
bh.task Boston Housing regression task.
cache_helpers Get or delete mlr cache directory
makeFilterEnsemble Create an ensemble feature filter.
makeFixedHoldoutInstance Generate a fixed holdout instance for resampling.
makeFilterWrapper Fuse learner with a feature filter method.
extractFDAFeatures Extract features from functional data.
listMeasureProperties List the supported measure properties.
configureMlr Configures the behavior of the package.
convertBMRToRankMatrix Convert BenchmarkResult to a rank-matrix.
getBMRMeasures Return measures used in benchmark.
makeMultilabelBinaryRelevanceWrapper Use binary relevance method to create a multilabel learner.
makeClassifTaskDesc Exported for internal use.
makeMulticlassWrapper Fuse learner with multiclass method.
makeWeightedClassesWrapper Wraps a classifier for weighted fitting where each class receives a weight.
makeStackedLearner Create a stacked learner object.
makeBaggingWrapper Fuse learner with the bagging technique.
getBMRTaskDescriptions Extract all task descriptions from benchmark result (DEPRECATED).
getBMRModels Extract all models from benchmark result.
extractFDAFourier Fast Fourier transform features.
makeLearner Create learner object.
makeExtractFDAFeatMethod Constructor for FDA feature extraction methods.
makeDummyFeaturesWrapper Fuse learner with dummy feature creator.
makeImputeWrapper Fuse learner with an imputation method.
getLearnerShortName Get the short name of the learner.
getBMRTaskDescs Extract all task descriptions from benchmark result.
getFeatSelResult Returns the selected feature set and optimization path after training.
getFeatureImportance Calculates feature importance values for trained models.
getLearnerType Get the type of the learner.
makeWrappedModel Induced model of learner.
getPredictionTaskDesc Get summarizing task description from prediction.
mergeBenchmarkResults Merge different BenchmarkResult objects.
measures Performance measures.
makeCostSensRegrWrapper Wraps a regression learner for use in cost-sensitive learning.
makeBaseWrapper Exported for internal use only.
listMeasures Find matching measures.
plotBMRBoxplots Create box or violin plots for a BenchmarkResult.
plotBMRRanksAsBarChart Create a bar chart for ranks in a BenchmarkResult.
makeChainModel Only exported for internal use.
getProbabilities Deprecated, use getPredictionProbabilities instead.
generateFilterValuesData Calculates feature filter values.
estimateResidualVariance Estimate the residual variance.
makeMultilabelStackingWrapper Use stacking method (stacked generalization) to create a multilabel learner.
makeMultilabelNestedStackingWrapper Use nested stacking method to create a multilabel learner.
makeMeasure Construct performance measure.
makeCostSensWeightedPairsWrapper Wraps a classifier for cost-sensitive learning to produce a weighted pairs model.
makeLearners Create multiple learners at once.
generateHyperParsEffectData Generate hyperparameter effect data.
getTaskClassLevels Get the class levels for classification and multilabel tasks.
getTaskId Get the id of the task.
getStackedBaseLearnerPredictions Returns the predictions for each base learner.
makeOverBaggingWrapper Fuse learner with the bagging technique and oversampling for imbalancy correction.
makePreprocWrapper Fuse learner with preprocessing.
makeResampleInstance Instantiates a resampling strategy object.
getTaskNFeats Get number of features in task. Learner for nonparametric classification for functional data.
makeTuneControlMBO Create control object for hyperparameter tuning with MBO.
makeRLearner.classif.fdausc.kernel Learner for kernel classification for functional data.
makeSMOTEWrapper Fuse learner with SMOTE oversampling for imbalancy correction in binary classification.
extractFDABsignal Bspline mlq features
plotResiduals Create residual plots for prediction objects or benchmark results.
removeConstantFeatures Remove constant features from a data set.
plotROCCurves Plots a ROC curve using ggplot2.
spatial.task J. Muenchow's Ecuador landslide data set
reimpute Re-impute a data set
impute Impute and re-impute data
iris.task Iris classification task.
makeCostMeasure Creates a measure for non-standard misclassification costs.
learners List of supported learning algorithms.
learnerArgsToControl Convert arguments to control structure.
normalizeFeatures Normalize features.
subsetTask Subset data in task.
removeHyperPars Remove hyperparameters settings of a learner.
phoneme.task Phoneme functional data multilabel classification task.
simplifyMeasureNames Simplify measure names.
tuneParams Hyperparameter tuning.
oversample Over- or undersample binary classification task to handle class imbalancy.
resample Fit models according to a resampling strategy.
smote Synthetic Minority Oversampling Technique to handle class imbalancy in binary classification.
mlr-package mlr: Machine Learning in R
pid.task PimaIndiansDiabetes classification task.
makeCostSensClassifWrapper Wraps a classification learner for use in cost-sensitive learning.
setPredictThreshold Set the probability threshold the learner should use.
makeTuneControlRandom Create control object for hyperparameter tuning with random search.
mergeSmallFactorLevels Merges small levels of factors into new level.
setHyperPars2 Only exported for internal use.
summarizeColumns Summarize columns of data.frame or task.
setMeasurePars Set parameters of performance measures
setHyperPars Set the hyperparameters of a learner object.
reextractFDAFeatures Re-extract features from a data set
reduceBatchmarkResults Reduce results of a batch-distributed benchmark.
tuneParamsMultiCrit Hyperparameter tuning for multiple measures at once.
makeExtractFDAFeatsWrapper Fuse learner with an extractFDAFeatures method.
makeFeatSelWrapper Fuse learner with feature selection.
getConfMatrix Confusion matrix.
friedmanPostHocTestBMR Perform a posthoc Friedman-Nemenyi test.
getBMRLearnerIds Return learner ids used in benchmark.
friedmanTestBMR Perform overall Friedman test for a BenchmarkResult.
getBMRLearnerShortNames Return learner short.names used in benchmark.
summarizeLevels Summarizes factors of a data.frame by tabling them.
getBMRMeasureIds Return measures IDs used in benchmark.
getBMRLearners Return learners used in benchmark.
getBMRPerformances Extract the test performance values from a benchmark result.
getDefaultMeasure Get default measure.
makeImputeMethod Create a custom imputation method.
makeMultilabelClassifierChainsWrapper Use classifier chains method (CC) to create a multilabel learner.
makeFunctionalData Create a data.frame containing functional features from a normal data.frame.
getFeatureImportanceLearner.regr.randomForestSRC Calculates feature importance values for a given learner.
getTaskCosts Extract costs in task.
getBMRPredictions Extract the predictions from a benchmark result.
getFilteredFeatures Returns the filtered features.
makeTuneControlDesign Create control object for hyperparameter tuning with predefined design.
makeTuneControlGenSA Create control object for hyperparameter tuning with GenSA.
makeMultilabelDBRWrapper Use dependent binary relevance method (DBR) to create a multilabel learner.
getFailureModelDump Return the error dump of FailureModel.
performance Measure performance of prediction.
parallelization Supported parallelization methods
getLearnerNote Get the note for the learner.
getFailureModelMsg Return error message of FailureModel.
getLearnerModel Get underlying R model of learner integrated into mlr.
getParamSet Get a description of all possible parameter settings for a learner.
getTaskData Extract data in task.
getTaskTargetNames Get the name(s) of the target column(s).
helpLearnerParam Get specific help for a learner's parameters.
getTaskSize Get number of observations in task.
getRRPredictions Get predictions from resample results.
getPredictionDump Return the error dump of a failed Prediction.
imputations Built-in imputation methods.
listLearners Find matching learning algorithms.
listLearnerProperties List the supported learner properties
makePreprocWrapperCaret Fuse learner with preprocessing.
getRRTaskDesc Get task description from resample results (DEPRECATED).
getTaskFormula Get formula of a task.
getTaskFeatureNames Get feature names of task.
hasProperties Deprecated, use hasLearnerProperties instead.
makeClassificationViaRegressionWrapper Classification via regression wrapper.
helpLearner Access help page of learner functions.
makeConstantClassWrapper Wraps a classification learner to support problems where the class label is (almost) constant.
makeTaskDescInternal Exported for internal use.
makeRLearner.classif.fdausc.glm Classification of functional data by Generalized Linear Models.
makeTuneControlCMAES Create control object for hyperparameter tuning with CMAES.
makeCustomResampledMeasure Construct your own resampled performance measure.
mlrFamilies mlr documentation families
makeTuneControlIrace Create control object for hyperparameter tuning with Irace.
makeTuneControlGrid Create control object for hyperparameter tuning with grid search.
makeDownsampleWrapper Fuse learner with simple downsampling (subsampling).
plotHyperParsEffect Plot the hyperparameter effects data
mtcars.task Motor Trend Car Road Tests clustering task.
makeModelMultiplexer Create model multiplexer for model selection to tune over multiple possible models.
makeRemoveConstantFeaturesWrapper Fuse learner with removal of constant features preprocessing.
makeModelMultiplexerParamSet Creates a parameter set for model multiplexer tuning.
makeResampleDesc Create a description object for a resampling strategy.
makeTuneWrapper Fuse learner with tuning.
trainLearner Train an R learner.
makeUndersampleWrapper Fuse learner with simple ove/underrsampling for imbalancy correction in binary classification.
plotBMRSummary Plot a benchmark summary.
plotLearningCurve Plot learning curve data using ggplot2.
plotCalibration Plot calibration data using ggplot2.
predictLearner Predict new data with an R learner.
plotCritDifferences Plot critical differences for a selected measure.
plotFilterValues Plot filter values using ggplot2.
predict.WrappedModel Predict new data.
plotPartialDependence Plot a partial dependence with ggplot2.
setId Set the id of a learner object.
yeast.task Yeast multilabel classification task.
setLearnerId Set the ID of a learner object.
sonar.task Sonar classification task.
spam.task Spam classification task.
train Train a learning algorithm.
setPredictType Set the type of predictions the learner should return.
selectFeatures Feature selection by wrapper approach.
plotThreshVsPerf Plot threshold vs. performance(s) for 2-class classification using ggplot2.
plotLearnerPrediction Visualizes a learning algorithm on a 1D or 2D data set.
setAggregation Set aggregation function of measure.
plotTuneMultiCritResult Plots multi-criteria results after tuning using ggplot2.
setThreshold Set threshold of prediction object.
wpbc.task Wisonsin Prognostic Breast Cancer (WPBC) survival task.
tuneThreshold Tune prediction threshold.
No Results!

Vignettes of mlr

No Results!

Last month downloads


License BSD_2_clause + file LICENSE
VignetteBuilder knitr
ByteCompile yes
Config/testthat/edition 3
Config/testthat/parallel true
Config/testthat/start-first base_generateHyperParsEffect, classif_bartMachine, tune_tuneIrace, featsel_filters, learners_all*, regr_h2ogbm
Encoding UTF-8
LazyData yes
RoxygenNote 7.1.1
SystemRequirements gdal (optional), geos (optional), proj (optional), udunits (optional), gsl (optional), gmp (optional), glu (optional), jags (optional), mpfr (optional), openmpi (optional)
NeedsCompilation yes
Packaged 2021-02-22 07:43:12 UTC; pjs
Repository CRAN
Date/Publication 2021-02-22 14:50:09 UTC
suggests ada , adabag , bartMachine , batchtools , bit64 , brnn , bst , C50 , care , caret (>= 6.0-57) , class , clue , cluster , ClusterR , clusterSim (>= 0.44-5) , cmaes , cowplot , crs , Cubist , deepnet , DiceKriging , DiscriMiner , e1071 , earth , elasticnet , emoa , evtree , extraTrees , fda.usc , FDboost , FNN , forecast (>= 8.3) , fpc , frbs , FSelector , FSelectorRcpp (>= 0.3.5) , gbm , GenSA , ggpubr , glmnet , GPfit , h2o (>= , Hmisc , irace (>= 2.0) , kernlab , kknn , klaR , knitr , laGP , LiblineaR , lintr (>= , MASS , mboost , mco , mda , memoise , mlbench , mldr , mlrMBO , mmpf , modeltools , mRMRe , neuralnet , nnet , nodeHarvest (>= 0.7-3) , numDeriv , pamr , pander , party , pec , penalized (>= 0.9-47) , pls , PMCMRplus , praznik (>= 5.0.0) , randomForest , randomForestSRC (>= 2.7.0) , ranger (>= 0.8.0) , rappdirs , refund , rex , rFerns , rgenoud , rknn , rmarkdown , Rmpi , ROCR , rotationForest , rpart , RRF , rrlda , rsm , RSNNS , rucrdtw , RWeka , sda , sf , smoof , snow , sparseLDA , stepPlr , survAUC , svglite , SwarmSVM , testthat , tgp , , tidyr , tsfeatures , vdiffr , wavelets , xgboost (>= 0.7)
imports backports (>= 1.1.0) , BBmisc (>= 1.11) , checkmate (>= 1.8.2) , data.table (>= 1.12.4) , ggplot2 , methods , parallelMap (>= 1.3) , stats , stringi , survival , utils , XML
depends ParamHelpers (>= 1.10) , R (>= 3.0.2)
Contributors Pascal Kerschke, Giuseppe Casalicchio, Michel Lang, Jakob Bossek, Tobias Kuehn, Erich Studerus, Zachary Jones, Schiffner Julia, Bernd Bischl, Jakob Richter, Leonard Judt, Florian Fendt, Janek Thomas, Mason Gallo, Philipp Probst, Xudong Sun, Bruno Vieira, Lars Kotthoff, Laura Beggel, Quay Au, Martin Binder, Florian Pfisterer, Stefan Coors, Steve Bronder, Alexander Engelhardt, Christoph Molnar, Annette Spooner

Include our badge in your README