Description Usage Arguments Details Value Examples
Implementation of the top-down procedure to correct the scores of the hierarchy according to the constraints that the score of a node cannot be greater than a score of its parents.
1 |
S |
a named flat scores matrix with examples on rows and classes on columns. |
g |
a graph of class |
root |
name of the class that it is the top-level of the hierarchy ( |
The HTD-DAG
algorithm modifies the flat scores according to the hierarchy of a DAG G through a unique run across
the nodes of the graph. For a given example x, the flat predictions f(x) = \hat{y} are hierarchically corrected to
\bar{y}, by per-level visiting the nodes of the DAG from top to bottom according to the following simple rule:
\bar{y}_i := ≤ft\{ \begin{array}{lll} \hat{y}_i & {\rm if} \quad i \in root(G) \\ \min_{j \in par(i)} \bar{y}_j & {\rm if} \quad \min_{j \in par(i)} \bar{y}_j < \hat{y}_i \\ \hat{y}_i & {\rm otherwise} \end{array} \right.
The node levels correspond to their maximum path length from the root.
A matrix with the scores of the classes corrected according to the HTD-DAG
algorithm.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.