AlexeyAB
2018-03-05 ae1768e5831caa95214b93b08ee711aede36df07
src/tree.c
@@ -24,6 +24,16 @@
    fprintf(stderr, "Found %d leaves.\n", found);
}
float get_hierarchy_probability(float *x, tree *hier, int c)
{
    float p = 1;
    while(c >= 0){
        p = p * x[c];
        c = hier->parent[c];
    }
    return p;
}
void hierarchy_predictions(float *predictions, int n, tree *hier, int only_leaves)
{
    int j;