cc: Classifier Chains for multi-label Classification

Description Usage Arguments Details Value References See Also Examples

View source: R/method_cc.R

Description

Create a Classifier Chains model for multilabel classification.

Usage

1
2
3
4
5
6
7
8
cc(
  mdata,
  base.algorithm = getOption("utiml.base.algorithm", "SVM"),
  chain = NA,
  ...,
  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"))

chain

A vector with the label names to define the chain order. If empty the chain is the default label sequence of the dataset. (Default: NA)

...

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))

Details

Classifier Chains is a Binary Relevance transformation method based to predict multi-label data. This is based on the one-versus-all approach to build a specific model for each label. It is different from BR method due the strategy of extended the attribute space with the 0/1 label relevances of all previous classifiers, forming a classifier chain.

Value

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

chain

A vector with the chain order.

labels

A vector with the label names in expected order.

models

A list of models named by the label names.

References

Read, J., Pfahringer, B., Holmes, G., & Frank, E. (2011). Classifier chains for multi-label classification. Machine Learning, 85(3), 333-359.

Read, J., Pfahringer, B., Holmes, G., & Frank, E. (2009). Classifier Chains for Multi-label Classification. Machine Learning and Knowledge Discovery in Databases, Lecture Notes in Computer Science, 5782, 254-269.

See Also

Other Transformation methods: brplus(), br(), 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 <- cc(toyml, "RANDOM")
pred <- predict(model, toyml)


# Use a specific chain with C5.0 classifier
mychain <- sample(rownames(toyml$labels))
model <- cc(toyml, 'C5.0', mychain)

# Set a specific parameter
model <- cc(toyml, 'KNN', k=5)

#Run with multiple-cores
model <- cc(toyml, 'RF', cores = 2, seed = 123)

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