Learn R Programming

⚠️There's a newer version (2.19.1) of this package.Take me there.

mlr (version 2.10)

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,043

Version

2.10

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 7th, 2017

Functions in mlr (2.10)

benchmark

Benchmark experiment for multiple learners and tasks.
capLargeValues

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

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

Featureless classification learner.
costiris.task

Iris cost-sensitive classification task.
dropFeatures

Drop some features of task.
downsample

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

Crossover.
configureMlr

Configures the behavior of the package.
createDummyFeatures

Generate dummy variables for factor features.
convertBMRToRankMatrix

Convert BenchmarkResult to a rank-matrix.
friedmanTestBMR

Perform overall Friedman test for a BenchmarkResult.
FeatSelControl

Create control structures for feature selection.
generateFeatureImportanceData

Generate feature importance.
friedmanPostHocTestBMR

Perform a posthoc Friedman-Nemenyi test.
estimateRelativeOverfitting

Estimate relative overfitting.
generateCritDifferencesData

Generate data for critical-differences plot.
generateCalibrationData

Generate classifier calibration data.
estimateResidualVariance

Estimate the residual variance.
FailureModel

Failure model.
filterFeatures

Filter features by thresholding filter values.
getBMRFeatSelResults

Extract the feature selection results from a benchmark result.
generateFilterValuesData

Calculates feature filter values.
generateHyperParsEffectData

Generate hyperparameter effect data.
getBMRLearnerIds

Return learner ids used in benchmark.
generateThreshVsPerfData

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

Generates a learning curve.
getBMRFilteredFeatures

Extract the feature selection results from a benchmark result.
generateFunctionalANOVAData

Generate a functional ANOVA decomposition
getBMRAggrPerformances

Extract the aggregated performance values from a benchmark result.
generatePartialDependenceData

Generate partial dependence.
getBMRTuneResults

Extract the tuning results from a benchmark result.
getBMRPerformances

Extract the test performance values from a benchmark result.
getBMRMeasures

Return measures used in benchmark.
getBMRTaskIds

Return task ids used in benchmark.
getBMRTaskDescriptions

Extract all task descriptions from benchmark result.
getBMRMeasureIds

Return measures IDs used in benchmark.
getBMRLearners

Return learners used in benchmark.
getBMRModels

Extract all models from benchmark result.
getBMRLearnerShortNames

Return learner short.names used in benchmark.
getBMRPredictions

Extract the predictions from a benchmark result.
getFeatSelResult

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

Returns the filtered features.
getFilterValues

Calculates feature filter values.
getCaretParamSet

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

Get the class weight parameter of a learner.
getHomogeneousEnsembleModels

Deprecated, use
getHyperPars

Get current parameter settings for a learner.
getConfMatrix

Confusion matrix.
getFailureModelMsg

Return error message of FailureModel.
getDefaultMeasure

Get default measure.
getMlrOptions

Returns a list of mlr's options.
getRRTaskDescription

Get task description from resample results.
getProbabilities

Deprecated, use
getTaskClassLevels

Get the class levels for classification and multilabel tasks.
getTaskCosts

Extract costs in task.
getLearnerPackages

Get the required R packages of the learner.
getStackedBaseLearnerPredictions

Returns the predictions for each base learner.
getLearnerParamSet

Get the parameter set of the learner.
getPredictionResponse

Get response / truth from prediction object.
getMultilabelBinaryPerformances

Retrieve binary classification measures for multilabel classification predictions.
getFeatureImportance

Calculates feature importance values for trained models.
getLearnerShortName

Get the short name of the learner.
getFeatureImportanceLearner.regr.randomForestSRC

Calculates feature importance values for a given learner.
getRRPredictions

Get predictions from resample results.
getRRPredictionList

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

Get number of features in task.
getTaskTargetNames

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

Get number of observations in task.
getTaskId

Get the id of the task.
getLearnerType

Get the type of the learner.
listFilterMethods

List filter methods.
listLearners

Find matching learning algorithms.
makeFeatSelWrapper

Fuse learner with feature selection.
makeModelMultiplexer

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

Creates a parameter set for model multiplexer tuning.
getParamSet

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

Get probabilities for some classes.
makeWeightedClassesWrapper

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

Induced model of learner.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
makeBaggingWrapper

Fuse learner with the bagging technique.
makeAggregation

Specify your own aggregation of measures.
analyzeFeatSelResult

Show and visualize the steps of feature selection.
makeFilterWrapper

Fuse learner with a feature filter method.
makeOverBaggingWrapper

Fuse learner with the bagging technique and oversampling for imbalancy correction.
makePreprocWrapper

Fuse learner with preprocessing.
makeFilter

Create a feature filter.
makeMultilabelBinaryRelevanceWrapper

Use binary relevance method to create a multilabel learner.
agri.task

European Union Agricultural Workforces clustering task.
makeMulticlassWrapper

Fuse learner with multiclass method.
plotFilterValues

Plot filter values using ggplot2.
plotFilterValuesGGVIS

Plot filter values using ggvis.
plotHyperParsEffect

Plot the hyperparameter effects data
getLearnerId

Get the ID of the learner.
bh.task

Boston Housing regression task.
summarizeColumns

Summarize columns of data.frame or task.
subsetTask

Subset data in task.
plotLearnerPrediction

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

Feature selection by wrapper approach.
RLearner

Internal construction / wrapping of learner object.
getNestedTuneResultsOptPathDf

Get the
getLearnerModel

Get underlying R model of learner integrated into mlr.
getNestedTuneResultsX

Get the tuned hyperparameter settings from a nested tuning.
getTaskFormula

Get formula of a task.
getTaskFeatureNames

Get feature names of task.
iris.task

Iris classification task.
isFailureModel

Is the model a FailureModel?
LearnerProperties

Query properties of learners.
aggregations

Aggregation methods.
addRRMeasure

Compute new measures for existing ResampleResult
getTaskType

Get the type of the task.
makeCustomResampledMeasure

Construct your own resampled performance measure.
makeLearner

Create learner object.
makePreprocWrapperCaret

Fuse learner with preprocessing.
makeCostSensWeightedPairsWrapper

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

Get target data of task.
makeImputeWrapper

Fuse learner with an imputation method.
makeUndersampleWrapper

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

Fuse learner with tuning.
makeRemoveConstantFeaturesWrapper

Fuse learner with removal of constant features preprocessing.
pid.task

PimaIndiansDiabetes classification task.
plotBMRBoxplots

Create box or violin plots for a BenchmarkResult.
plotPartialDependence

Plot a partial dependence with ggplot2.
plotPartialDependenceGGVIS

Plot a partial dependence using ggvis.
setAggregation

Set aggregation function of measure.
regr.randomForest

regression using randomForest.
reimpute

Re-impute a data set
setHyperPars

Set the hyperparameters of a learner object.
calculateConfusionMatrix

Confusion matrix.
calculateROCMeasures

Calculate receiver operator measures.
getLearnerParVals

Get the parameter values of the learner.
imputations

Built-in imputation methods.
impute

Impute and re-impute data
joinClassLevels

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

Extract data in task.
getTaskDescription

Get a summarizing task description.
getLearnerPredictType

Get the predict type of the learner.
mergeSmallFactorLevels

Merges small levels of factors into new level.
mlrFamilies

mlr documentation families
plotTuneMultiCritResult

Plots multi-criteria results after tuning using ggplot2.
resample

Fit models according to a resampling strategy.
plotTuneMultiCritResultGGVIS

Plots multi-criteria results after tuning using ggvis.
setPredictType

Set the type of predictions the learner should return.
setThreshold

Set threshold of prediction object.
tuneThreshold

Tune prediction threshold.
tuneParamsMultiCrit

Hyperparameter tuning for multiple measures at once.
ResamplePrediction

Prediction from resampling.
bc.task

Wisconsin Breast Cancer classification task.
asROCRPrediction

Converts predictions to a format package ROCR can handle.
getTuneResult

Returns the optimal hyperparameters and optimization path after training.
hasProperties

Deprecated, use
listMeasures

Find matching measures.
makeConstantClassWrapper

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

Creates a measure for non-standard misclassification costs.
makeFixedHoldoutInstance

Generate a fixed holdout instance for resampling.
makeImputeMethod

Create a custom imputation method.
lung.task

NCCTG Lung Cancer survival task.
makeCostSensClassifWrapper

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

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

List of supported learning algorithms.
makeLearners

Create multiple learners at once.
makeMeasure

Construct performance measure.
plotThreshVsPerf

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

Plot threshold vs. performance(s) for 2-class classification using ggvis.
makeMultilabelStackingWrapper

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

Plot calibration data using ggplot2.
plotCritDifferences

Plot critical differences for a selected measure.
makeMultilabelNestedStackingWrapper

Use nested stacking method to create a multilabel learner.
predict.WrappedModel

Predict new data.
plotViperCharts

Visualize binary classification predictions via ViperCharts system.
setLearnerId

Set the ID of a learner object.
setPredictThreshold

Set the probability threshold the learner should use.
summarizeLevels

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

Merge different BenchmarkResult objects.
train

Train a learning algorithm.
makeSMOTEWrapper

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

Create a stacked learner object.
measures

Performance measures.
plotBMRRanksAsBarChart

Create a bar chart for ranks in a BenchmarkResult.
plotBMRSummary

Plot a benchmark summary.
plotLearningCurve

Plot learning curve data using ggplot2.
plotLearningCurveGGVIS

Plot learning curve data using ggvis.
predictLearner

Predict new data with an R learner.
makeMultilabelClassifierChainsWrapper

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

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

Convert arguments to control structure.
regr.featureless

Featureless regression learner.
mtcars.task

Motor Trend Car Road Tests clustering task.
oversample

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

Normalize features.
plotResiduals

Create residual plots for prediction objects or benchmark results.
performance

Measure performance of prediction.
plotROCCurves

Plots a ROC curve using ggplot2.
removeHyperPars

Remove hyperparameters settings of a learner.
removeConstantFeatures

Remove constant features from a data set.
yeast.task

Yeast multilabel classification task.
wpbc.task

Wisonsin Prognostic Breast Cancer (WPBC) survival task.
trainLearner

Train an R learner.
TuneControl

Create control structures for tuning.
TuneMultiCritControl

Create control structures for multi-criteria tuning.
tuneParams

Hyperparameter tuning.
setHyperPars2

Only exported for internal use.
setId

Set the id of a learner object.
smote

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

Sonar classification task.
BenchmarkResult

BenchmarkResult object.
Aggregation

Aggregation object.
ConfusionMatrix

Confusion matrix
FeatSelResult

Result of feature selection.
makeResampleInstance

Instantiates a resampling strategy object.
makeResampleDesc

Create a description object for a resampling strategy.
ResampleResult

ResampleResult object.
Prediction

Prediction object.
makeClassifTask

Create a classification, regression, survival, cluster, cost-sensitive classification or
TaskDesc

Description object for task.
TuneResult

Result of tuning.
TuneMultiCritResult

Result of multi-criteria tuning.