ns {utiml} | R Documentation |
Nested Stacking for multi-label Classification
Description
Create a Nested Stacking model for multilabel classification.
Usage
ns(
mdata,
base.algorithm = getOption("utiml.base.algorithm", "SVM"),
chain = NA,
...,
predict.params = list(),
cores = NULL,
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. |
predict.params |
A list of default arguments passed to the predict
algorithm. (default: |
cores |
Ignored because this method does not support multi-core. |
seed |
An optional integer used to set the seed.
(Default: |
Details
Nested Stacking is based on Classifier Chains transformation method to predict multi-label data. It differs from CC to predict the labels values in the training step and to regularize the output based on the labelsets available on training data.
Value
An object of class NSmodel
containing the set of fitted
models, including:
- chain
A vector with the chain order
- labels
A vector with the label names in expected order
- labelset
The matrix containing only labels values
- models
A list of models named by the label names.
References
Senge, R., Coz, J. J. del, & Hullermeier, E. (2013). Rectifying classifier chains for multi-label classification. In Workshop of Lernen, Wissen & Adaptivitat (LWA 2013) (pp. 162-169). Bamberg, Germany.
See Also
Other Transformation methods:
brplus()
,
br()
,
cc()
,
clr()
,
dbr()
,
ebr()
,
ecc()
,
eps()
,
esl()
,
homer()
,
lift()
,
lp()
,
mbr()
,
ppt()
,
prudent()
,
ps()
,
rakel()
,
rdbr()
,
rpc()
Examples
model <- ns(toyml, "RANDOM")
pred <- predict(model, toyml)
# Use a specific chain with C5.0 classifier
mychain <- sample(rownames(toyml$labels))
model <- ns(toyml, 'C5.0', mychain)
# Set a specific parameter
model <- ns(toyml, 'KNN', k=5)