Research Article
Large-Scale Coarse-to-Fine Object Retrieval Ontology and Deep Local Multitask Learning
Algorithm 6
Conversion of the score vector to the binary vector.
| Procedure: BINARY_CONVERTER | | Input: | | testPred //an array of multilabel predictions of each sample in the test set | | bestThresholds //an array of best thresholds of each label | | Output: | | binaryTestPred //an array of multilabel predictions of each sample. | | Goal: | | Convert the score vector to the binary vector in an MCC imbalanced data problem solver | | BEGIN | | for i = 0 to numberOfSample do: | | begin | | [binaryConverted] ⟵ [NULL] | | #binary converter for each prediction | | for j = 0 to numberOfLabel do: | | begin | | if testPred [i][j] >= bestThresholds [j]: | | binaryConverted ⟵ 1 | | else: | | binaryConverted ⟵ 0 | | end | | binaryTestPred ⟵ binaryConverted #show overall prediction | | end | | END |
|