Learn R Programming

mlr (version 2.19.1)

Machine Learning in R

Description

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.

Copy Link

Version

Install

install.packages('mlr')

Monthly Downloads

9,216

Version

2.19.1

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 29th, 2022

Functions in mlr (2.19.1)

FeatSelResult

Result of feature selection.
Aggregation

Aggregation object.
BenchmarkResult

BenchmarkResult object.
LearnerProperties

Query properties of learners.
makeClassifTask

Create a classification task.
FailureModel

Failure model.
FeatSelControl

Create control structures for feature selection.
makeClusterTask

Create a cluster task.
Task

Create a classification, regression, survival, cluster, cost-sensitive classification or multilabel task.
Prediction

Prediction object.
TaskDesc

Description object for task.
ResampleResult

ResampleResult object.
agri.task

European Union Agricultural Workforces clustering task.
RLearner

Internal construction / wrapping of learner object.
makeRegrTask

Create a regression task.
ResamplePrediction

Prediction from resampling.
bh.task

Boston Housing regression task.
TuneResult

Result of tuning.
TuneMultiCritResult

Result of multi-criteria tuning.
ConfusionMatrix

Confusion matrix
makeCostSensTask

Create a cost-sensitive classification task.
makeSurvTask

Create a survival task.
MeasureProperties

Query properties of measures.
cache_helpers

Get or delete mlr cache directory
bc.task

Wisconsin Breast Cancer classification task.
asROCRPrediction

Converts predictions to a format package ROCR can handle.
batchmark

Run machine learning benchmarks as distributed experiments.
dropFeatures

Drop some features of task.
TuneControl

Control object for tuning
getMlrOptions

Returns a list of mlr's options.
getBMRFeatSelResults

Extract the feature selection results from a benchmark result.
estimateResidualVariance

Estimate the residual variance.
makeMultilabelTask

Create a multilabel task.
estimateRelativeOverfitting

Estimate relative overfitting.
TuneMultiCritControl

Create control structures for multi-criteria tuning.
analyzeFeatSelResult

Show and visualize the steps of feature selection.
benchmark

Benchmark experiment for multiple learners and tasks.
extractFDABsignal

Bspline mlq features
crossover

Crossover.
configureMlr

Configures the behavior of the package.
getConfMatrix

Confusion matrix.
changeData

Change Task Data
checkLearner

Exported for internal use only.
downsample

Downsample (subsample) a task or a data.frame.
addRRMeasure

Compute new measures for existing ResampleResult
generateCritDifferencesData

Generate data for critical-differences plot.
aggregations

Aggregation methods.
calculateConfusionMatrix

Confusion matrix.
generateFeatureImportanceData

Generate feature importance.
getBMRLearnerIds

Return learner ids used in benchmark.
getBMRLearnerShortNames

Return learner short.names used in benchmark.
checkPredictLearnerOutput

Check output returned by predictLearner.
calculateROCMeasures

Calculate receiver operator measures.
capLargeValues

Convert large/infinite numeric values in a data.frame or task.
convertBMRToRankMatrix

Convert BenchmarkResult to a rank-matrix.
createDummyFeatures

Generate dummy variables for factor features.
extractFDADTWKernel

DTW kernel features
convertMLBenchObjToTask

Convert a machine learning benchmark / demo object from package mlbench to a task.
getBMRPerformances

Extract the test performance values from a benchmark result.
createSpatialResamplingPlots

Create (spatial) resampling plot objects.
getFeatureImportance

Calculates feature importance values for trained models.
getTaskType

Get the type of the task.
getRRPredictionList

Get list of predictions for train and test set of each single resample iteration.
friedmanTestBMR

Perform overall Friedman test for a BenchmarkResult.
getBMRPredictions

Extract the predictions from a benchmark result.
getFailureModelDump

Return the error dump of FailureModel.
extractFDAMultiResFeatures

Multiresolution feature extraction.
getBMRLearners

Return learners used in benchmark.
getBMRMeasureIds

Return measures IDs used in benchmark.
extractFDATsfeatures

Time-Series Feature Heuristics
getLearnerParamSet

Get the parameter set of the learner.
getDefaultMeasure

Get default measure.
costiris.task

Iris cost-sensitive classification task.
extractFDAWavelets

Discrete Wavelet transform features.
extractFDAFeatures

Extract features from functional data.
extractFDAFourier

Fast Fourier transform features.
extractFDAFPCA

Extract functional principal component analysis features.
isFailureModel

Is the model a FailureModel?
getFeatSelResult

Returns the selected feature set and optimization path after training.
getFailureModelMsg

Return error message of FailureModel.
generateFilterValuesData

Calculates feature filter values.
generateHyperParsEffectData

Generate hyperparameter effect data.
getLearnerShortName

Get the short name of the learner.
getLearnerPredictType

Get the predict type of the learner.
fuelsubset.task

FuelSubset functional data regression task.
getLearnerType

Get the type of the learner.
getFeatureImportanceLearner

Calculates feature importance values for a given learner.
getNestedTuneResultsOptPathDf

Get the opt.paths from each tuning step from the outer resampling.
getNestedTuneResultsX

Get the tuned hyperparameter settings from a nested tuning.
generateCalibrationData

Generate classifier calibration data.
filterFeatures

Filter features by thresholding filter values.
getStackedBaseLearnerPredictions

Returns the predictions for each base learner.
friedmanPostHocTestBMR

Perform a posthoc Friedman-Nemenyi test.
makeFunctionalData

Create a data.frame containing functional features from a normal data.frame.
makeLearners

Create multiple learners at once.
makeCustomResampledMeasure

Construct your own resampled performance measure.
getRRPredictions

Get predictions from resample results.
getBMRFilteredFeatures

Extract the feature selection results from a benchmark result.
getPredictionTaskDesc

Get summarizing task description from prediction.
getRRTaskDesc

Get task description from resample results (DEPRECATED).
plotCritDifferences

Plot critical differences for a selected measure.
getTaskSize

Get number of observations in task.
generateLearningCurveData

Generates a learning curve.
generatePartialDependenceData

Generate partial dependence.
getProbabilities

Deprecated, use getPredictionProbabilities instead.
getBMRTaskDescriptions

Extract all task descriptions from benchmark result (DEPRECATED).
mergeBenchmarkResults

Merge different BenchmarkResult objects.
getLearnerId

Get the ID of the learner.
getBMRMeasures

Return measures used in benchmark.
getTaskClassLevels

Get the class levels for classification and multilabel tasks.
getBMRModels

Extract all models from benchmark result.
getTaskTargetNames

Get the name(s) of the target column(s).
getFunctionalFeatures

Get only functional features from a task or a data.frame.
getLearnerParVals

Get the parameter values of the learner.
getBMRTaskIds

Return task ids used in benchmark.
getBMRTaskDescs

Extract all task descriptions from benchmark result.
getHomogeneousEnsembleModels

Deprecated, use getLearnerModel instead.
getBMRTuneResults

Extract the tuning results from a benchmark result.
getOOBPreds

Extracts out-of-bag predictions from trained models.
getOOBPredsLearner

Provides out-of-bag predictions for a given model and the corresponding learner.
generateThreshVsPerfData

Generate threshold vs. performance(s) for 2-class classification.
getFilteredFeatures

Returns the filtered features.
joinClassLevels

Join some class existing levels to new, larger class levels for classification problems.
getLearnerModel

Get underlying R model of learner integrated into mlr.
getTaskId

Get the id of the task.
getTaskDesc

Get a summarizing task description.
getLearnerPackages

Get the required R packages of the learner.
getTuneResult

Returns the optimal hyperparameters and optimization path after training.
getTuneResultOptPath

Get the optimization path of a tuning result.
getCaretParamSet

Get tuning parameters from a learner of the caret R-package.
getBMRAggrPerformances

Extract the aggregated performance values from a benchmark result.
getParamSet

Get a description of all possible parameter settings for a learner.
getClassWeightParam

Get the class weight parameter of a learner.
getTaskDescription

Deprecated, use getTaskDesc instead.
getHyperPars

Get current parameter settings for a learner.
listTaskTypes

List the supported task types in mlr
getRRDump

Return the error dump of ResampleResult.
getLearnerNote

Get the note for the learner.
getRRTaskDescription

Get task description from resample results (DEPRECATED).
getPredictionDump

Return the error dump of a failed Prediction.
getResamplingIndices

Get the resampling indices from a tuning or feature selection wrapper..
helpLearnerParam

Get specific help for a learner's parameters.
getPredictionProbabilities

Get probabilities for some classes.
getTaskNFeats

Get number of features in task.
makeTuneWrapper

Fuse learner with tuning.
makeBaggingWrapper

Fuse learner with the bagging technique.
getTaskCosts

Extract costs in task.
getTaskData

Extract data in task.
learners

List of supported learning algorithms.
listFilterEnsembleMethods

List ensemble filter methods.
getTaskFeatureNames

Get feature names of task.
impute

Impute and re-impute data
listFilterMethods

List filter methods.
getMultilabelBinaryPerformances

Retrieve binary classification measures for multilabel classification predictions.
lung.task

NCCTG Lung Cancer survival task.
makeCostSensRegrWrapper

Wraps a regression learner for use in cost-sensitive learning.
makeClassifTaskDesc

Exported for internal use.
getTaskFormula

Get formula of a task.
gunpoint.task

Gunpoint functional data classification task.
iris.task

Iris classification task.
hasFunctionalFeatures

Check whether the object contains functional features.
makeCostSensWeightedPairsWrapper

Wraps a classifier for cost-sensitive learning to produce a weighted pairs model.
makeImputeMethod

Create a custom imputation method.
listMeasureProperties

List the supported measure properties.
listLearners

Find matching learning algorithms.
parallelization

Supported parallelization methods
listMeasures

Find matching measures.
makeExtractFDAFeatsWrapper

Fuse learner with an extractFDAFeatures method.
getPredictionResponse

Get response / truth from prediction object.
makeStackedLearner

Create a stacked learner object.
makeFeatSelWrapper

Fuse learner with feature selection.
makeTuneControlGenSA

Create control object for hyperparameter tuning with GenSA.
makeBaseWrapper

Exported for internal use only.
makeFilterWrapper

Fuse learner with a feature filter method.
imputations

Built-in imputation methods.
makeFixedHoldoutInstance

Generate a fixed holdout instance for resampling.
makeClassificationViaRegressionWrapper

Classification via regression wrapper.
selectFeatures

Feature selection by wrapper approach.
makeChainModel

Only exported for internal use.
makeUndersampleWrapper

Fuse learner with simple ove/underrsampling for imbalancy correction in binary classification.
getTaskTargets

Get target data of task.
hasProperties

Deprecated, use hasLearnerProperties instead.
makeFilter

Create a feature filter.
makeConstantClassWrapper

Wraps a classification learner to support problems where the class label is (almost) constant.
makeOverBaggingWrapper

Fuse learner with the bagging technique and oversampling for imbalancy correction.
mlr-package

mlr: Machine Learning in R
makeDummyFeaturesWrapper

Fuse learner with dummy feature creator.
makeExtractFDAFeatMethod

Constructor for FDA feature extraction methods.
makeMultilabelNestedStackingWrapper

Use nested stacking method to create a multilabel learner.
makeMultilabelStackingWrapper

Use stacking method (stacked generalization) to create a multilabel learner.
makeTaskDescInternal

Exported for internal use.
listLearnerProperties

List the supported learner properties
makeFilterEnsemble

Create an ensemble feature filter.
measures

Performance measures.
makeMultilabelClassifierChainsWrapper

Use classifier chains method (CC) to create a multilabel learner.
setAggregation

Set aggregation function of measure.
makeModelMultiplexer

Create model multiplexer for model selection to tune over multiple possible models.
makeModelMultiplexerParamSet

Creates a parameter set for model multiplexer tuning.
helpLearner

Access help page of learner functions.
makeMulticlassWrapper

Fuse learner with multiclass method.
makePreprocWrapper

Fuse learner with preprocessing.
makeTuneControlGrid

Create control object for hyperparameter tuning with grid search.
makeAggregation

Specify your own aggregation of measures.
makeTuneControlCMAES

Create control object for hyperparameter tuning with CMAES.
makeMultilabelBinaryRelevanceWrapper

Use binary relevance method to create a multilabel learner.
makePreprocWrapperCaret

Fuse learner with preprocessing.
makeImputeWrapper

Fuse learner with an imputation method.
makeTuneControlIrace

Create control object for hyperparameter tuning with Irace.
makeRLearner.classif.fdausc.glm

Classification of functional data by Generalized Linear Models.
plotHyperParsEffect

Plot the hyperparameter effects data
mergeSmallFactorLevels

Merges small levels of factors into new level.
learnerArgsToControl

Convert arguments to control structure.
plotLearnerPrediction

Visualizes a learning algorithm on a 1D or 2D data set.
removeHyperPars

Remove hyperparameters settings of a learner.
makeRLearner.classif.fdausc.kernel

Learner for kernel classification for functional data.
makeCostMeasure

Creates a measure for non-standard misclassification costs.
makeCostSensClassifWrapper

Wraps a classification learner for use in cost-sensitive learning.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
makeLearner

Create learner object.
makeWeightedClassesWrapper

Wraps a classifier for weighted fitting where each class receives a weight.
makeTuneControlDesign

Create control object for hyperparameter tuning with predefined design.
setThreshold

Set threshold of prediction object.
makeRLearner.classif.fdausc.np

Learner for nonparametric classification for functional data.
makeMultilabelDBRWrapper

Use dependent binary relevance method (DBR) to create a multilabel learner.
makeResampleInstance

Instantiates a resampling strategy object.
subsetTask

Subset data in task.
mlrFamilies

mlr documentation families
makeTuneControlMBO

Create control object for hyperparameter tuning with MBO.
setPredictType

Set the type of predictions the learner should return.
makeTuneControlRandom

Create control object for hyperparameter tuning with random search.
makeSMOTEWrapper

Fuse learner with SMOTE oversampling for imbalancy correction in binary classification.
makeMeasure

Construct performance measure.
plotLearningCurve

Plot learning curve data using ggplot2.
plotPartialDependence

Plot a partial dependence with ggplot2.
plotTuneMultiCritResult

Plots multi-criteria results after tuning using ggplot2.
pid.task

PimaIndiansDiabetes classification task.
mtcars.task

Motor Trend Car Road Tests clustering task.
plotBMRSummary

Plot a benchmark summary.
reimpute

Re-impute a data set
normalizeFeatures

Normalize features.
plotCalibration

Plot calibration data using ggplot2.
oversample

Over- or undersample binary classification task to handle class imbalancy.
removeConstantFeatures

Remove constant features from a data set.
yeast.task

Yeast multilabel classification task.
plotBMRBoxplots

Create box or violin plots for a BenchmarkResult.
predict.WrappedModel

Predict new data.
sonar.task

Sonar classification task.
spam.task

Spam classification task.
predictLearner

Predict new data with an R learner.
performance

Measure performance of prediction.
makeRemoveConstantFeaturesWrapper

Fuse learner with removal of constant features preprocessing.
makeWrappedModel

Induced model of learner.
phoneme.task

Phoneme functional data multilabel classification task.
plotBMRRanksAsBarChart

Create a bar chart for ranks in a BenchmarkResult.
makeResampleDesc

Create a description object for a resampling strategy.
summarizeColumns

Summarize columns of data.frame or task.
setId

Set the id of a learner object.
plotROCCurves

Plots a ROC curve using ggplot2.
summarizeLevels

Summarizes factors of a data.frame by tabling them.
reextractFDAFeatures

Re-extract features from a data set
setLearnerId

Set the ID of a learner object.
setMeasurePars

Set parameters of performance measures
train

Train a learning algorithm.
plotResiduals

Create residual plots for prediction objects or benchmark results.
setPredictThreshold

Set the probability threshold the learner should use.
reduceBatchmarkResults

Reduce results of a batch-distributed benchmark.
plotThreshVsPerf

Plot threshold vs. performance(s) for 2-class classification using ggplot2.
tuneThreshold

Tune prediction threshold.
resample

Fit models according to a resampling strategy.
setHyperPars2

Only exported for internal use.
spatial.task

J. Muenchow's Ecuador landslide data set
tuneParams

Hyperparameter tuning.
wpbc.task

Wisonsin Prognostic Breast Cancer (WPBC) survival task.
plotFilterValues

Plot filter values using ggplot2.
tuneParamsMultiCrit

Hyperparameter tuning for multiple measures at once.
setHyperPars

Set the hyperparameters of a learner object.
smote

Synthetic Minority Oversampling Technique to handle class imbalancy in binary classification.
simplifyMeasureNames

Simplify measure names.
trainLearner

Train an R learner.