Learn R Programming

utiml (version 0.1.6)

rakel: Random k-labelsets for multilabel classification

Description

Create a RAkEL model for multilabel classification.

Usage

rakel(
  mdata,
  base.algorithm = getOption("utiml.base.algorithm", "SVM"),
  k = 3,
  m = 2 * mdata$measures$num.labels,
  overlapping = TRUE,
  ...,
  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"))

k

The number of labels used in each labelset. (Default: 3)

m

The number of LP models. Used when overlapping is TRUE, otherwise it is ignored. (Default: 2 * length(labels))

overlapping

Logical value, that defines if the method must overlapping the labelsets. If FALSE the method uses disjoint labelsets. (Default: TRUE)

...

Others arguments passed to the base algorithm 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))

Value

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

labels

A vector with the label names.

labelsets

A list with the labelsets used to build the LP models.

model

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

Details

RAndom k labELsets is an ensemble of LP models where each classifier is trained with a small set of labels, called labelset. Two different strategies for constructing the labelsets are the disjoint and overlapping labelsets.

References

Tsoumakas, G., Katakis, I., & Vlahavas, I. (2011). Random k-labelsets for multilabel classification. IEEE Transactions on Knowledge and Data Engineering, 23(7), 1079-1089.

See Also

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

Other Powerset: eps(), lp(), ppt(), ps()

Examples

Run this code
# NOT RUN {
model <- rakel(toyml, "RANDOM")
pred <- predict(model, toyml)
# }
# NOT RUN {
## SVM using k = 4 and m = 100
model <- rakel(toyml, "SVM", k=4, m=100)

## Random Forest using disjoint labelsets
model <- rakel(toyml, "RF", overlapping=FALSE)
# }

Run the code above in your browser using DataLab