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