Learn R Programming

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

mlr (version 2.1)

mlr: 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

7,379

Version

2.1

License

BSD_3_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bernd Bischl

Last Published

July 21st, 2014

Functions in mlr (2.1)

getTaskNFeats

Get number of feature in task.
BenchmarkResult

Result of a benchmark run.
getParamSet

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

Configures the behavior of the package.
makeTuneMultiCritControlGrid

Create control structures for multi-criteria tuning.
LearnerProperties

Set, add, remove or query properties of learners
crossover

crossover
Prediction

Prediction object.
makeClassifTask

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

Drop some features of task.
getTaskTargets

Get target column of task.
listFilterMethods

Returns all available feature filter methods.
makeCostSensWeightedPairsWrapper

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

Returns the list of fitted models.
getFailureModelMsg

Return error message of FailureModel.
estimateResidualVariance

Estimate the residual variance
getFilterValues

Calculates feature filter values.
Aggregation

TuneMultiCritResult

Result of multi-criteria tuning.
createDummyFeatures

Generate dummy variables for factor features.
getTaskCosts

Extract costs in task.
mlr.sonar

Sonar classification task
makeFeatSelWrapper

Fuse learner with feature selection.
TuneResult

Result of tuning.
RLearner

Internal construction / wrapping of learner object.
FeatSelResult

Result of feature selection.
TaskDesc

Description object for task.
getPredictions

Extract the predictions from a benchmark result.
aggregations

Aggregation methods.
FailureModel

Failure model.
downsample

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

Create a custom imputation method.
analyzeFeatSelResult

Show and visualize the steps of feature selection.
makeResampleInstance

Instantiates a resampling strategy object.
imputations

Built in imputation methods The built-ins are:
  • imputeConstant(const)for imputation using a constant value,
  • imputeMedian()for imputation using the median,
  • imputeMode()for imputation using the mode,
  • imputeMin(multiplier)for imputation using the minimum,
  • imputeMax(multiplier)for imputation using the maximum,
  • imputeNormal(mean, sd)for imputation using normally distributed random values. Mean and standard deviation will be calculated from the data if not provided.
  • imputeHist(breaks, use.mids)for imputation using random values with probabilities calculated usingtableorhist.
  • imputeLearner(learner, preimpute)for imputations using the response of a classification or regression learner.
makeOverBaggingWrapper

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

Specifiy your own aggregation of measures
setHyperPars2

Only exported for internal use.
ResamplePrediction

Prediction from resampling.
makeTuneControlCMAES

Create control structures for tuning.
setId

Set the id of a learner object.
plotTuneMultiCritResult

Plots multi-criteria results after tuning.
subsetTask

Subset data in task.
predict.WrappedModel

Predict new data.
smote

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

Create learner object.
listMeasures

Find matching measures.
tuneParamsMultiCrit

Hyperparameter tuning for multiple measures at once.
setPredictType

Set the type of predictions the learner should return.
isFailureModel

Is the model a FailureModel?
trainLearner

Train an R learner.
makeWrappedModel

Induced model of learner.
removeHyperPars

Remove hyperparameters settings of a learner.
getTuneResult

Returns the optimal hyperparameters and optimization path after training or benchmarking.
makeBaggingWrapper

Fuse learner with the bagging technique.
getMlrOptions

Returns a list of mlr's options
setAggregation

Set aggregation function of measure.
makeFilterWrapper

Fuse learner with a feature filter method.
showHyperPars

Display all possible hyperparameter settings for a learner that mlr knows.
getBaggingModels

Returns the list of models fitted in bagging.
getAggrPerformances

Extract the aggregated measures of a benchmark result.
plotThreshVsPerf

Plot threshold vs. performance(s) for 2-class classification.
makeCostMeasure

Creates a measure for non-standard misclassification costs.
reimpute

Re-impute a data set
crossval

Fit models according to a resampling strategy.
makeModelMultiplexer

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

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

learnerArgsToControl

Convert arguments to control structure.
makePreprocWrapper

Fuse learner with preprocessing.
filterFeatures

Filter features by thresholding filter values.
getPerformances

Extract performance measures of bechmark result.
makeModelMultiplexerParamSet

Creates a parameter set for model multiplexer tuning.
mlr.bh

Boston Housing regression task
train

Train a learning algorithm.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
predictLearner

Predict new data with an R learner.
removeConstantFeatures

Remove constant features from a data set.
getFilteredFeatures

Returns the filtered features.
normalizeFeatures

Normalize features
getLearnerModel

Get underlying R model of learner integrated into mlr.
makeSMOTEWrapper

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

Get formula of a task.
oversample

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

Converts predictions to a format package ROCR can handle.
setThreshold

Set threshold of prediction object.
makeWeightedClassesWrapper

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

Get current parameter settings for a learner.
impute

Impute and re-impute data
makeResampleDesc

Create a description object for a resampling strategy.
makeImputeWrapper

Fuse learner with an imputation method.
makeFeatSelControlExhaustive

Create control structures for feature selection.
plotFilterValues

Plot filter values.
setHyperPars

Set the hyperparameters of a learner object.
makeUndersampleWrapper

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

Extract data in task.
getTaskFeatureNames

Get feature names of task.
tuneParams

Hyperparameter tuning.
performance

Measure performance of prediction.
selectFeatures

Feature selection by wrapper approach.
makeCustomResampledMeasure

Construct your own resampled performance measure.
makeFixedHoldoutInstance

Generate a fixed holdout instance for resampling.
getConfMatrix

Confusion matrix.
getProbabilities

Get probabilities for some classes.
tuneThreshold

Tune prediction threshold.
benchmark

Benchmark experiment for multiple learners and tasks.
makeMeasure

Construct performance measure.
getCostSensWeightedPairsModels

Returns the list of fitted models.
makeCostSensClassifWrapper

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

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

Returns the selected feature set and optimization path after training or benchmarking.
mlr.iris

Iris classification task
makeTuneWrapper

Fuse learner with tuning.
getCostSensClassifModel

Returns the underlying classification model.
getFilterResult

Returns a filter result after training or benchmarking.
listLearners

Find matching learning algorithms.
learners

List of supported learning algorithms.
measures

Performance measures.