subset_correction: Subset Correction of a predicted result

Description Usage Arguments Details Value Note References See Also Examples

View source: R/threshold.R

Description

This method restrict a multi-label learner to predict only label combinations whose existence is present in the (training) data. To this all labelsets that are predicted but are not found on training data is replaced by the most similar labelset.

Usage

1
subset_correction(mlresult, train_y, probability = FALSE)

Arguments

mlresult

An object of mlresult that contain the scores and bipartition values.

train_y

A matrix/data.frame with all labels values of the training dataset or a mldr train dataset.

probability

A logical value. If TRUE the predicted values are the score between 0 and 1, otherwise the values are bipartition 0 or 1. (Default: FALSE)

Details

If the most similar is not unique, those label combinations with higher frequency in the training data are preferred. The Hamming loss distance is used to determine the difference between the labelsets.

Value

A new mlresult where all results are present in the training labelsets.

Note

The original paper describes a method to create only bipartitions result, but we adapted the method to change the scores. Based on the base.threshold value the scores higher than the threshold value, but must be lower are changed to respect this restriction. If NULL this correction will be ignored.

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 threshold: fixed_threshold(), lcard_threshold(), mcut_threshold(), pcut_threshold(), rcut_threshold(), scut_threshold()

Examples

1
2
prediction <- predict(br(toyml, "RANDOM"), toyml)
subset_correction(prediction, toyml)

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