br: Binary Relevance for multi-label Classification

Description Usage Arguments Details Value References See Also Examples

View source: R/method_br.R

Description

Create a Binary Relevance model for multilabel classification.

Usage

1
2
3
4
5
6
7
br(
  mdata,
  base.algorithm = getOption("utiml.base.algorithm", "SVM"),
  ...,
  cores = getOption("utiml.cores", 1),
  seed = getOption("utiml.seed", NA)
)

Arguments

mdata

A mldr dataset used to train the binary models.

base.algorithm

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

...

Others arguments passed to the base algorithm for all subproblems

cores

The number of cores to parallelize the training. (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(), dbr(), ebr(), ecc(), eps(), esl(), 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
model <- br(toyml, "RANDOM")
pred <- predict(model, toyml)


# Use SVM as base algorithm
model <- br(toyml, "SVM")
pred <- predict(model, toyml)

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

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

rivolli/utiml documentation built on June 1, 2021, 11:48 p.m.