Alexey
2017-01-02 b5938098d12d5c9fe48e7cc71ae3d75b7306833f
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;