Binary Relevance for multi-label Classification

Description

Create a Binary Relevance model for multilabel classification.

Usage

1
2
br(mdata, base.method = getOption("utiml.base.method", "SVM"), ...,
  cores = getOption("utiml.cores", 1), seed = getOption("utiml.seed", NA))

Arguments

mdata

A mldr dataset used to train the binary models.

base.method

A string with the name of the base method. (Default: options("utiml.base.method", "SVM"))

...

Others arguments passed to the base method for all subproblems

cores

The number of cores to parallelize the training. Values higher than 1 require the parallel package. (Default: options("utiml.cores", 1))

seed

An optional integer used to set the seed. This is useful when the method is run in parallel. (Default: options("utiml.seed", NA))

Details

Binary Relevance is a simple and effective transformation method to predict multi-label data. This is based on the one-versus-all approach to build a specific model for each label.

Value

An object of class BRmodel containing the set of fitted models, including:

labels

A vector with the label names.

models

A list of the generated models, named by the label names.

References

Boutell, M. R., Luo, J., Shen, X., & Brown, C. M. (2004). Learning multi-label scene classification. Pattern Recognition, 37(9), 1757-1771.

See Also

Other Transformation methods: brplus, cc, clr, ctrl, dbr, ebr, ecc, eps, homer, lift, lp, mbr, ns, ppt, prudent, ps, rakel, rdbr, rpc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
model <- br(toyml, "RANDOM")
pred <- predict(model, toyml)

## Not run: 
# Use SVM as base method
model <- br(toyml, "SVM")
pred <- predict(model, toyml)

# Change the base method and use 4 CORES
model <- br(toyml[1:50], 'RF', cores = 4, seed = 123)

# Set a parameters for all subproblems
model <- br(toyml, 'KNN', k=5)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.