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

Vignettes of mlr

No Results!

Last month downloads


License BSD_2_clause + file LICENSE
VignetteBuilder knitr
ByteCompile yes
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)
NeedsCompilation yes
Packaged 2020-10-05 09:37:10 UTC; pjs
Repository CRAN
Date/Publication 2020-10-05 10:20:03 UTC
suggests ada , adabag , bartMachine , batchtools , brnn , bst , C50 , care , caret (>= 6.0-57) , class , clue , cluster , ClusterR , clusterSim (>= 0.44-5) , cmaes , cowplot , CoxBoost , crs , Cubist , deepnet , DiceKriging , DiscriMiner , e1071 , earth , elasticnet , emoa , evtree , extraTrees , fda.usc , FDboost , FNN , forecast (>= 8.3) , fpc , frbs , FSelector , FSelectorRcpp (>= 0.2.1) , 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 , penalized (>= 0.9-47) , pls , PMCMR (>= 4.1) , praznik (>= 5.0.0) , randomForest , randomForestSRC (>= 2.7.0) , ranger (>= 0.8.0) , rappdirs , refund , rex , rFerns , rgenoud , rknn , rmarkdown , ROCR , rotationForest , rpart , RRF , rrlda , rsm , RSNNS , rucrdtw , RWeka , sda , sf , smoof , 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