mbr {utiml} | R Documentation |
Meta-BR or 2BR for multi-label Classification
Description
Create a Meta-BR (MBR) classifier to predict multi-label data. To this, two round of Binary Relevance is executed, such that, the first step generates new attributes to enrich the second prediction.
Usage
mbr(
mdata,
base.algorithm = getOption("utiml.base.algorithm", "SVM"),
folds = 1,
phi = 0,
...,
predict.params = list(),
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:
|
folds |
The number of folds used in internal prediction. If this value is 1 all dataset will be used in the first prediction. (Default: 1) |
phi |
A value between 0 and 1 to determine the correlation coefficient, The value 0 include all labels in the second phase and the 1 only the predicted label. (Default: 0) |
... |
Others arguments passed to the base algorithm for all subproblems. |
predict.params |
A list of default arguments passed to the predictor
algorithm. (Default: |
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
This implementation use complete training set for both training and
prediction steps of 2BR. However, the phi
parameter may be used to
remove labels with low correlations on the second step.
Value
An object of class MBRmodel
containing the set of fitted
models, including:
- labels
A vector with the label names.
- phi
The value of
phi
parameter.- correlation
The matrix of label correlations used in combination with
phi
parameter to define the labels used in the second step.- basemodel
The BRModel used in the first iteration.
- models
A list of models named by the label names used in the second iteration.
References
Tsoumakas, G., Dimou, A., Spyromitros, E., Mezaris, V., Kompatsiaris, I., & Vlahavas, I. (2009). Correlation-based pruning of stacked binary relevance models for multi-label learning. In Proceedings of the Workshop on Learning from Multi-Label Data (MLD'09) (pp. 22-30). Godbole, S., & Sarawagi, S. (2004). Discriminative Methods for Multi-labeled Classification. In Data Mining and Knowledge Discovery (pp. 1-26).
See Also
Other Transformation methods:
brplus()
,
br()
,
cc()
,
clr()
,
dbr()
,
ebr()
,
ecc()
,
eps()
,
esl()
,
homer()
,
lift()
,
lp()
,
ns()
,
ppt()
,
prudent()
,
ps()
,
rakel()
,
rdbr()
,
rpc()
Other Stacking methods:
brplus()
Examples
model <- mbr(toyml, "RANDOM")
pred <- predict(model, toyml)
# Use 10 folds and different phi correlation with C5.0 classifier
model <- mbr(toyml, 'C5.0', 10, 0.2)
# Run with 2 cores
model <- mbr(toyml, "SVM", cores = 2, seed = 123)
# Set a specific parameter
model <- mbr(toyml, 'KNN', k=5)