Learn R Programming

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

mlr (version 2.8)

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

Version

2.8

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bernd Bischl

Last Published

February 13th, 2016

Functions in mlr (2.8)

TaskDesc

Description object for task.
TuneMultiCritResult

Result of multi-criteria tuning.
getRRPredictions

Get predictions from resample results.
generateFilterValuesData

Calculates feature filter values.
generateLearningCurveData

Generates a learning curve.
crossover

Crossover.
configureMlr

Configures the behavior of the package.
bh.task

Boston Housing regression task.
friedmanTestBMR

Perform overall Friedman test for a BenchmarkResult.
getBMRFeatSelResults

Extract the feature selection results from a benchmark result.
estimateResidualVariance

Estimate the residual variance.
convertBMRToRankMatrix

Convert BenchmarkResult to a rank-matrix.
agri.task

European Union Agricultural Workforces clustering task.
getConfMatrix

Confusion matrix.
getDefaultMeasure

Get default measure.
getProbabilities

Deprecated, use getPredictionProbabilities instead.
getFailureModelMsg

Return error message of FailureModel.
getTaskTargetNames

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

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

Get probabilities for some classes.
aggregations

Aggregation methods.
getTaskClassLevels

Get the class levels for classification and multilabel tasks.
getTaskCosts

Extract costs in task.
iris.task

Iris classification task.
learners

List of supported learning algorithms.
getClassWeightParam

Get the class weight parameter of a learner.
getStackedBaseLearnerPredictions

Returns the predictions for each base learner.
getNestedTuneResultsX

Get the tuned hyperparameter settings from a nested tuning.
getTaskId

Get the id of the task.
generateCritDifferencesData

Generate data for critical-differences plot.
makeFilter

Create a feature filter.
makeResampleInstance

Instantiates a resampling strategy object.
makePreprocWrapper

Fuse learner with preprocessing.
getBMRFilteredFeatures

Extract the feature selection results from a benchmark result.
makeBaggingWrapper

Fuse learner with the bagging technique.
mtcars.task

Motor Trend Car Road Tests clustering task.
isFailureModel

Is the model a FailureModel?
makeResampleDesc

Create a description object for a resampling strategy.
makeModelMultiplexer

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

Get a summarizing task description.
mergeBenchmarkResultLearner

Merge different learners of BenchmarkResult objects.
plotROCCurves

Plots a ROC curve using ggplot2.
makeMeasure

Construct performance measure.
tuneParamsMultiCrit

Hyperparameter tuning for multiple measures at once.
predictLearner

Predict new data with an R learner.
wpbc.task

Wisonsin Prognostic Breast Cancer (WPBC) survival task.
setPredictThreshold

Set the probability threshold the learner should use.
getPredictionResponse

Get response / truth from prediction object.
yeast.task

Yeast multilabel classification task.
sonar.task

Sonar classification task.
makeClassifTask

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

Benchmark experiment for multiple learners and tasks.
getBMRTaskIds

Return task ids used in benchmark.
FeatSelResult

Result of feature selection.
plotBMRRanksAsBarChart

Create a bar chart for ranks in a BenchmarkResult.
plotBMRSummary

Plot a benchmark summary.
getFeatSelResult

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

Extract all models from benchmark result.
getTuneResult

Returns the optimal hyperparameters and optimization path after training.
friedmanPostHocTestBMR

Perform a posthoc Friedman-Nemenyi test.
filterFeatures

Filter features by thresholding filter values.
asROCRPrediction

Converts predictions to a format package ROCR can handle.
learnerArgsToControl

Convert arguments to control structure.
ResampleResult

ResampleResult object.
getTaskType

Get the type of the task.
generateThreshVsPerfData

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

Aggregation object.
setAggregation

Set aggregation function of measure.
getFilterValues

Calculates feature filter values.
plotBMRBoxplots

Create box or violin plots for a BenchmarkResult.
getBMRLearnerIds

Return learner ids used in benchmark.
getHomogeneousEnsembleModels

Deprecated, use getLearnerModel instead.
dropFeatures

Drop some features of task.
getNestedTuneResultsOptPathDf

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

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

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

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

NCCTG Lung Cancer survival task.
TuneControl

Create control structures for tuning.
Prediction

Prediction object.
plotTuneMultiCritResult

Plots multi-criteria results after tuning using ggplot2.
makeAggregation

Specify your own aggregation of measures.
plotCritDifferences

Plot critical differences for a selected measure.
pid.task

PimaIndiansDiabetes classification task.
getMlrOptions

Returns a list of mlr's options.
getTaskFeatureNames

Get feature names of task.
summarizeLevels

Summarizes factors of a data.frame by tabling them.
predict.WrappedModel

Predict new data.
getTaskTargets

Get target data of task.
getBMRPerformances

Extract the test performance values from a benchmark result.
plotThreshVsPerf

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

Estimate relative overfitting.
getTaskFormula

Get formula of a task.
getBMRMeasures

Return measures used in benchmark.
makeWeightedClassesWrapper

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

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

Wisconsin Breast Cancer classification task.
setThreshold

Set threshold of prediction object.
LearnerProperties

Query properties of learners.
makeOverBaggingWrapper

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

Return learner short.names used in benchmark.
ResamplePrediction

Prediction from resampling.
makeStackedLearner

Create a stacked learner object.
makeDownsampleWrapper

Fuse learner with simple downsampling (subsampling).
makeFilterWrapper

Fuse learner with a feature filter method.
getMultilabelBinaryPerformances

Retrieve binary classification measures for multilabel classification predictions.
makeMultilabelBinaryRelevanceWrapper

Use binary relevance method to create a multilabel learner.
listLearners

Find matching learning algorithms.
capLargeValues

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

Deprecated, use hasLearnerProperties instead.
getTaskData

Extract data in task.
plotTuneMultiCritResultGGVIS

Plots multi-criteria results after tuning using ggvis.
setPredictType

Set the type of predictions the learner should return.
tuneThreshold

Tune prediction threshold.
getHyperPars

Get current parameter settings for a learner.
getLearnerModel

Get underlying R model of learner integrated into mlr.
makeImputeMethod

Create a custom imputation method.
createDummyFeatures

Generate dummy variables for factor features.
reimpute

Re-impute a data set
downsample

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

Fuse learner with multiclass method.
makeCostMeasure

Creates a measure for non-standard misclassification costs.
FeatSelControl

Create control structures for feature selection.
plotFilterValues

Plot filter values using ggplot2.
resample

Fit models according to a resampling strategy.
listMeasures

Find matching measures.
mergeBenchmarkResultTask

Merge different tasks of BenchmarkResult objects.
plotLearningCurve

Plot learning curve data using ggplot2.
removeHyperPars

Remove hyperparameters settings of a learner.
joinClassLevels

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

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

Construct your own resampled performance measure.
train

Train a learning algorithm.
summarizeColumns

Summarize columns of data.frame or task.
getParamSet

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

Hyperparameter tuning.
measures

Performance measures.
plotFilterValuesGGVIS

Plot filter values using ggvis.
TuneMultiCritControl

Create control structures for multi-criteria tuning.
getTaskNFeats

Get number of features in task.
costiris.task

Iris cost-sensitive classification task.
setId

Set the id of a learner object.
TuneResult

Result of tuning.
getTaskSize

Get number of observations in task.
removeConstantFeatures

Remove constant features from a data set.
plotPartialPrediction

Plot a partial prediction with ggplot2.
subsetTask

Subset data in task.
getBMRAggrPerformances

Extract the aggregated performance values from a benchmark result.
setHyperPars

Set the hyperparameters of a learner object.
makeWrappedModel

Induced model of learner.
trainLearner

Train an R learner.
getBMRTuneResults

Extract the tuning results from a benchmark result.
RLearner

Internal construction / wrapping of learner object.
FailureModel

Failure model.
makeFeatSelWrapper

Fuse learner with feature selection.
generateCalibrationData

Generate classifier calibration data.
normalizeFeatures

Normalize features.
generatePartialPredictionData

Generate partial predictions.
makeTuneWrapper

Fuse learner with tuning.
BenchmarkResult

BenchmarkResult object.
makeFixedHoldoutInstance

Generate a fixed holdout instance for resampling.
analyzeFeatSelResult

Show and visualize the steps of feature selection.
getCaretParamSet

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

Built-in imputation methods.
plotLearningCurveGGVIS

Plot learning curve data using ggvis.
getBMRLearners

Return learners used in benchmark.
mergeSmallFactorLevels

Merges small levels of factors into new level.
setHyperPars2

Only exported for internal use.
getBMRMeasureIds

Return measures IDs used in benchmark.
makeCostSensClassifWrapper

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

Feature selection by wrapper approach.
getBMRPredictions

Extract the predictions from a benchmark result.
plotCalibration

Plot calibration data using ggplot2.
impute

Impute and re-impute data
regr.randomForest

regression using randomForest.
plotPartialPredictionGGVIS

Plot a partial prediction using ggvis.
plotThreshVsPerfGGVIS

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

Visualize binary classification predictions via ViperCharts system.
makeModelMultiplexerParamSet

Creates a parameter set for model multiplexer tuning.
listFilterMethods

List filter methods.
getFilteredFeatures

Returns the filtered features.
plotLearnerPrediction

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

Fuse learner with an imputation method.
makeLearner

Create learner object.
performance

Measure performance of prediction.
makeSMOTEWrapper

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

Fuse learner with preprocessing.