Description Usage Arguments Details Value References See Also Examples
View source: R/method_brplus.R
This function predicts values based upon a model trained by brplus
.
1 2 3 4 5 6 7 8 9 10 11 |
object |
Object of class ' |
newdata |
An object containing the new input data. This must be a matrix, data.frame or a mldr object. |
strategy |
The strategy prefix to determine how to estimate the values of the augmented features of unlabeled examples. The possible values are: |
order |
The label sequence used to update the initial labels results
based on the final results. This argument is used only when the
|
probability |
Logical indicating whether class probabilities should be
returned. (Default: |
... |
Others arguments passed to the base algorithm prediction 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: |
The strategies of estimate the values of the new features are separated in two groups:
NU
)This use the initial prediction of BR to all labels. This name is because no modification is made to the initial estimates of the augmented features during the prediction phase
This strategy update the initial prediction in that the final predict occurs. There are three possibilities to define the order of label sequences:
Ord
)The order is define by the user,
require a new argument called order
.
Stat
)Use the frequency of single labels in the training set to define the sequence, where the least frequent labels are predicted first
Dyn
)Takes into account the confidence of the initial prediction for each independent single label, to define a sequence, where the labels predicted with less confidence are updated first.
An object of type mlresult, based on the parameter probability.
Cherman, E. A., Metz, J., & Monard, M. C. (2012). Incorporating label dependency into the binary relevance framework for multi-label classification. Expert Systems with Applications, 39(2), 1647-1655.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Predict SVM scores
model <- brplus(toyml, "RANDOM")
pred <- predict(model, toyml)
# Predict SVM bipartitions and change the method to use No Update strategy
pred <- predict(model, toyml, strategy = 'NU', probability = FALSE)
# Predict using a random sequence to update the labels
labels <- sample(rownames(toyml$labels))
pred <- predict(model, toyml, strategy = 'Ord', order = labels)
# Passing a specif parameter for SVM predict method
pred <- predict(model, toyml, na.action = na.fail)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.