Learn R Programming

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

mlr (version 2.0)

mlr: Machine Learning in R.

Description

Interface to a large number of classification and regression techniques, including machine-readable parameter descriptions. There is also a n experimental extension for surival analysis and cost-sensitive learning. Generic resampling, including cross-validation, bootstrapping and subsampling. Hyperparameter tuning with modern optimization techniques. Filter and wrapper methods for feature selection. Extension of basic learners with additional operations common in machine learning.

Copy Link

Version

Install

install.packages('mlr')

Monthly Downloads

7,379

Version

2.0

License

BSD_3_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bernd Bischl

Last Published

July 4th, 2014

Functions in mlr (2.0)

selectFeatures

Feature selection by wrapper approach.
BenchmarkResult

Result of a benchmark run.
getTaskFeatureNames

Get feature names of task.
plotLearnerPrediction

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

Get underlying R model of learner integrated into mlr.
plotThreshVsPerf

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

Returns all available feature filter methods.
aggregations

Aggregation methods.
makeImputeMethod

Create a custom imputation method.
estimateResidualVariance

Estimate the residual variance
makeBaggingWrapper

Fuse learner with the bagging technique.
predictLearner

Predict new data with an R learner.
makeCostSensClassifWrapper

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

Generate dummy variables for factor features.
smote

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

Fuse learner with preprocessing.
TuneResult

Result of tuning.
getTaskCosts

Extract costs in task.
makeCostMeasure

Creates a measure for non-standard misclassification costs.
configureMlr

Configures the behavior of the package.
RLearner

Internal construction / wrapping of learner object.
ResamplePrediction

Prediction from resampling.
setHyperPars

Set the hyperparameters of a learner object.
dropFeatures

Drop some features of task.
crossover

crossover
getFeatSelResult

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

Get number of feature in task.
isFailureModel

Is the model a FailureModel?
getCostSensWeightedPairsModels

Returns the list of fitted models.
getFilteredFeatures

Returns the filtered features.
getTuneResult

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

Get current parameter settings for a learner.
makeClassifTask

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

Create control structures for feature selection.
makeOverBaggingWrapper

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

Get formula of a task.
getBaggingModels

Returns the list of models fitted in bagging.
getTaskData

Extract data in task.
train

Train a learning algorithm.
performance

Measure performance of prediction.
makeLearner

Create learner object.
getPredictions

Extract the predictions from a benchmark result.
setThreshold

Set threshold of prediction object.
listMeasures

Find matching measures.
setId

Set the id of a learner object.
makeAggregation

Specifiy your own aggregation of measures
oversample

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

Train an R learner.
showHyperPars

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

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

Construct your own resampled performance measure.
setPredictType

Set the type of predictions the learner should return.
reimpute

Re-impute a data set
mlr.bh

Boston Housing regression task
setHyperPars2

Only exported for internal use.
getCostSensClassifModel

Returns the underlying classification model.
getProbabilities

Get probabilities for some classes.
removeConstantFeatures

Remove constant features from a data set.
makeTuneWrapper

Fuse learner with tuning.
getPerformances

Extract performance measures of bechmark result.
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.
predict.WrappedModel

Predict new data.
makeCostSensWeightedPairsWrapper

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

Tune prediction threshold.
downsample

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

learnerArgsToControl

Convert arguments to control structure.
getCostSensRegrModels

Returns the list of fitted models.
tuneParams

Hyperparameter tuning.
Prediction

Prediction object.
getParamSet

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

Subset data in task.
makeFixedHoldoutInstance

Generate a fixed holdout instance for resampling.
FeatSelResult

Result of feature selection.
filterFeatures

Filter features by thresholding filter values.
setAggregation

Set aggregation function of measure.
makeFilterWrapper

Fuse learner with a feature filter method.
makeModelMultiplexerParamSet

Creates a parameter set for model multiplexer tuning.
getAggrPerformances

Extract the aggregated measures of a benchmark result.
plotFilterValues

Plot filter values.
asROCRPrediction

Converts predictions to a format package ROCR can handle.
FailureModel

Failure model.
LearnerProperties

Set, add, remove or query properties of learners
analyzeFeatSelResult

Show and visualize the steps of feature selection.
TaskDesc

Description object for task.
Aggregation

makeUndersampleWrapper

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

Induced model of learner.
getFilterValues

Calculates feature filter values.
benchmark

Benchmark experiment for multiple learners and tasks.
makeImputeWrapper

Fuse learner with an imputation method.
normalizeFeatures

Normalize features
makeCostSensRegrWrapper

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

Confusion matrix.
makeWeightedClassesWrapper

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

Get target column of task.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
getFilterResult

Returns a filter result after training or benchmarking.
mlr.sonar

Sonar classification task
makeSMOTEWrapper

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

Instantiates a resampling strategy object.
listLearners

Find matching learning algorithms.
makeResampleDesc

Create a description object for a resampling strategy.
makeFeatSelWrapper

Fuse learner with feature selection.
makeMeasure

Construct performance measure.
getMlrOptions

Returns a list of mlr's options
mlr.iris

Iris classification task
crossval

Fit models according to a resampling strategy.
makeTuneControlCMAES

Create control structures for tuning.
impute

Impute and re-impute data
measures

Performance measures.
learners

List of supported learning algorithms.