R: Use dependent binary relevance method (DBR) to create a...

makeMultilabelDBRWrapper {mlr} | R Documentation

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

### Description

Every learner which is implemented in mlr and which supports binary classification can be converted to a wrapped DBR multilabel learner. The multilabel classification problem is converted into simple binary classifications for each label/target on which the binary learner is applied. For each target, actual information of all binary labels (except the target variable) is used as additional features. During prediction these labels need are obtained by the binary relevance method using the same binary learner.

Models can easily be accessed via getLearnerModel.

### Usage

    makeMultilabelDBRWrapper(learner)

### Arguments

`learner` | (Learner | `character(1)`) The learner. If you pass a string the learner will be created via makeLearner.

### Value

Learner.

### References

Montanes, E. et al. (2013) Dependent binary relevance models for multi-label classification Artificial Intelligence Center, University of Oviedo at Gijon, Spain.

### See Also

Other wrapper: `makeBaggingWrapper()`, `makeClassificationViaRegressionWrapper()`, `makeConstantClassWrapper()`, `makeCostSensClassifWrapper()`, `makeCostSensRegrWrapper()`, `makeDownsampleWrapper()`, `makeDummyFeaturesWrapper()`, `makeExtractFDAFeatsWrapper()`, `makeFeatSelWrapper()`, `makeFilterWrapper()`, `makeImputeWrapper()`, `makeMulticlassWrapper()`, `makeMultilabelBinaryRelevanceWrapper()`, `makeMultilabelClassifierChainsWrapper()`, `makeMultilabelNestedStackingWrapper()`, `makeMultilabelStackingWrapper()`, `makeOverBaggingWrapper()`, `makePreprocWrapperCaret()`, `makePreprocWrapper()`, `makeRemoveConstantFeaturesWrapper()`, `makeSMOTEWrapper()`, `makeTuneWrapper()`, `makeUndersampleWrapper()`, `makeWeightedClassesWrapper()`

Other multilabel: `getMultilabelBinaryPerformances()`, `makeMultilabelBinaryRelevanceWrapper()`, `makeMultilabelClassifierChainsWrapper()`, `makeMultilabelNestedStackingWrapper()`, `makeMultilabelStackingWrapper()`

### Examples

    d = getTaskData(yeast.task)
    # drop some labels so example runs faster
    d = d[seq(1, nrow(d), by = 20), c(1:2, 15:17)]
    task = makeMultilabelTask(data = d, target = c("label1", "label2"))
    lrn = makeLearner("classif.rpart")
    lrn = makeMultilabelBinaryRelevanceWrapper(lrn)
    lrn = setPredictType(lrn, "prob")
    # train, predict and evaluate
    mod = train(lrn, task)
    pred = predict(mod, task)
    performance(pred, measure = list(multilabel.hamloss, multilabel.subset01, multilabel.f1))
    # the next call basically has the same structure for any multilabel meta wrapper
    getMultilabelBinaryPerformances(pred, measures = list(mmce, auc))
    # above works also with predictions from resample!

[Package mlr version 2.19.0 Index]