Learn R Programming

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

mlr (version 2.9)

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

Version

2.9

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

August 3rd, 2016

Functions in mlr (2.9)

capLargeValues

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

Configures the behavior of the package.
bc.task

Wisconsin Breast Cancer classification task.
analyzeFeatSelResult

Show and visualize the steps of feature selection.
benchmark

Benchmark experiment for multiple learners and tasks.
agri.task

European Union Agricultural Workforces clustering task.
aggregations

Aggregation methods.
convertMLBenchObjToTask

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

Converts predictions to a format package ROCR can handle.
downsample

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

Iris cost-sensitive classification task.
estimateRelativeOverfitting

Estimate relative overfitting.
dropFeatures

Drop some features of task.
crossover

Crossover.
FailureModel

Failure model.
estimateResidualVariance

Estimate the residual variance.
FeatSelControl

Create control structures for feature selection.
generateLearningCurveData

Generates a learning curve.
createDummyFeatures

Generate dummy variables for factor features.
generateFunctionalANOVAData

Generate a functional ANOVA decomposition
generateHyperParsEffectData

Generate hyperparameter effect data.
filterFeatures

Filter features by thresholding filter values.
friedmanPostHocTestBMR

Perform a posthoc Friedman-Nemenyi test.
generateCritDifferencesData

Generate data for critical-differences plot.
friedmanTestBMR

Perform overall Friedman test for a BenchmarkResult.
generateCalibrationData

Generate classifier calibration data.
generatePartialDependenceData

Generate partial dependence.
getBMRModels

Extract all models from benchmark result.
generateFilterValuesData

Calculates feature filter values.
getBMRLearnerShortNames

Return learner short.names used in benchmark.
getBMRFilteredFeatures

Extract the feature selection results from a benchmark result.
generateThreshVsPerfData

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

Return learner ids used in benchmark.
getBMRMeasureIds

Return measures IDs used in benchmark.
getBMRMeasures

Return measures used in benchmark.
getBMRLearners

Return learners used in benchmark.
getBMRFeatSelResults

Extract the feature selection results from a benchmark result.
getBMRAggrPerformances

Extract the aggregated performance values from a benchmark result.
getFailureModelMsg

Return error message of FailureModel.
getFeatSelResult

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

Extract the test performance values from a benchmark result.
getBMRPredictions

Extract the predictions from a benchmark result.
getBMRTaskIds

Return task ids used in benchmark.
getConfMatrix

Confusion matrix.
getClassWeightParam

Get the class weight parameter of a learner.
getCaretParamSet

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

Extract the tuning results from a benchmark result.
getDefaultMeasure

Get default measure.
getParamSet

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

Get the tuned hyperparameter settings from a nested tuning.
getMultilabelBinaryPerformances

Retrieve binary classification measures for multilabel classification predictions.
getNestedTuneResultsOptPathDf

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

Get underlying R model of learner integrated into mlr.
getMlrOptions

Returns a list of mlr's options.
bh.task

Boston Housing regression task.
getFilterValues

Calculates feature filter values.
getFilteredFeatures

Returns the filtered features.
getTaskClassLevels

Get the class levels for classification and multilabel tasks.
getStackedBaseLearnerPredictions

Returns the predictions for each base learner.
getTaskNFeats

Get number of features in task.
getTaskSize

Get number of observations in task.
impute

Impute and re-impute data
iris.task

Iris classification task.
convertBMRToRankMatrix

Convert BenchmarkResult to a rank-matrix.
getPredictionProbabilities

Get probabilities for some classes.
getPredictionResponse

Get response / truth from prediction object.
listMeasures

Find matching measures.
listLearners

Find matching learning algorithms.
getTaskId

Get the id of the task.
getTaskFormula

Get formula of a task.
makeCostMeasure

Creates a measure for non-standard misclassification costs.
makeCostSensClassifWrapper

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

Fuse learner with feature selection.
makeFilter

Create a feature filter.
makePreprocWrapperCaret

Fuse learner with preprocessing.
makeRemoveConstantFeaturesWrapper

Fuse learner with removal of constant features preprocessing.
performance

Measure performance of prediction.
oversample

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

Merges small levels of factors into new level.
mergeBenchmarkResultTask

Merge different tasks of BenchmarkResult objects.
plotLearningCurveGGVIS

Plot learning curve data using ggvis.
plotLearningCurve

Plot learning curve data using ggplot2.
getTaskCosts

Extract costs in task.
getTaskData

Extract data in task.
getTaskType

Get the type of the task.
getTuneResult

Returns the optimal hyperparameters and optimization path after training.
makeMultilabelClassifierChainsWrapper

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

Create a custom imputation method.
makeImputeWrapper

Fuse learner with an imputation method.
makeMultilabelDBRWrapper

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

List filter methods.
learners

List of supported learning algorithms.
makeCustomResampledMeasure

Construct your own resampled performance measure.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
makeModelMultiplexer

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

Fuse learner with multiclass method.
makeModelMultiplexerParamSet

Creates a parameter set for model multiplexer tuning.
makeMultilabelBinaryRelevanceWrapper

Use binary relevance method to create a multilabel learner.
makeUndersampleWrapper

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

Fuse learner with tuning.
getHomogeneousEnsembleModels

Deprecated, use getLearnerModel instead.
getHyperPars

Get current parameter settings for a learner.
getTaskDescription

Get a summarizing task description.
getTaskFeatureNames

Get feature names of task.
getTaskTargetNames

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

Get target data of task.
isFailureModel

Is the model a FailureModel?
joinClassLevels

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

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

Fuse learner with the bagging technique.
regr.randomForest

regression using randomForest.
reimpute

Re-impute a data set
RLearner

Internal construction / wrapping of learner object.
selectFeatures

Feature selection by wrapper approach.
makeAggregation

Specify your own aggregation of measures.
summarizeColumns

Summarize columns of data.frame or task.
summarizeLevels

Summarizes factors of a data.frame by tabling them.
lung.task

NCCTG Lung Cancer survival task.
makeWeightedClassesWrapper

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

Induced model of learner.
plotBMRRanksAsBarChart

Create a bar chart for ranks in a BenchmarkResult.
plotBMRSummary

Plot a benchmark summary.
plotROCCurves

Plots a ROC curve using ggplot2.
plotThreshVsPerf

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

Visualize binary classification predictions via ViperCharts system.
TuneControl

Create control structures for tuning.
TuneMultiCritControl

Create control structures for multi-criteria tuning.
plotTuneMultiCritResultGGVIS

Plots multi-criteria results after tuning using ggvis.
setPredictThreshold

Set the probability threshold the learner should use.
setPredictType

Set the type of predictions the learner should return.
makeLearner

Create learner object.
makeOverBaggingWrapper

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

Construct performance measure.
makePreprocWrapper

Fuse learner with preprocessing.
smote

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

Set threshold of prediction object.
plotThreshVsPerfGGVIS

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

Plots multi-criteria results after tuning using ggplot2.
normalizeFeatures

Normalize features.
mtcars.task

Motor Trend Car Road Tests clustering task.
yeast.task

Yeast multilabel classification task.
getRRPredictions

Get predictions from resample results.
getProbabilities

Deprecated, use getPredictionProbabilities instead.
hasProperties

Deprecated, use hasLearnerProperties instead.
imputations

Built-in imputation methods.
LearnerProperties

Query properties of learners.
learnerArgsToControl

Convert arguments to control structure.
makeCostSensRegrWrapper

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

Wraps a classifier for cost-sensitive learning to produce a weighted pairs model.
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.
makeMultilabelStackingWrapper

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

Performance measures.
mergeBenchmarkResultLearner

Merge different learners of BenchmarkResult objects.
plotFilterValues

Plot filter values using ggplot2.
plotFilterValuesGGVIS

Plot filter values using ggvis.
plotBMRBoxplots

Create box or violin plots for a BenchmarkResult.
pid.task

PimaIndiansDiabetes classification task.
resample

Fit models according to a resampling strategy.
makeSMOTEWrapper

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

Plot calibration data using ggplot2.
makeStackedLearner

Create a stacked learner object.
plotPartialDependence

Plot a partial dependence with ggplot2.
plotCritDifferences

Plot critical differences for a selected measure.
removeConstantFeatures

Remove constant features from a data set.
plotPartialDependenceGGVIS

Plot a partial dependence using ggvis.
setAggregation

Set aggregation function of measure.
removeHyperPars

Remove hyperparameters settings of a learner.
setHyperPars

Set the hyperparameters of a learner object.
tuneParams

Hyperparameter tuning.
plotHyperParsEffect

Plot the hyperparameter effects data
tuneParamsMultiCrit

Hyperparameter tuning for multiple measures at once.
plotLearnerPrediction

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

Predict new data.
setHyperPars2

Only exported for internal use.
predictLearner

Predict new data with an R learner.
setId

Set the id of a learner object.
sonar.task

Sonar classification task.
subsetTask

Subset data in task.
tuneThreshold

Tune prediction threshold.
wpbc.task

Wisonsin Prognostic Breast Cancer (WPBC) survival task.
ResamplePrediction

Prediction from resampling.
train

Train a learning algorithm.
trainLearner

Train an R learner.