cc {utiml} | R Documentation |
Classifier Chains for multi-label Classification
Description
Create a Classifier Chains model for multilabel classification.
Usage
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:
|
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:
|
... |
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:
|
seed |
An optional integer used to set the seed. This is useful when
the method is run in parallel. (Default: |
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
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)