Alexey
2017-08-03 de625aa4a7fc5b6b1a7fd1b9a4c13d06b3a8c9a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef TREE_H
#define TREE_H
 
typedef struct{
    int *leaf;
    int n;
    int *parent;
    int *group;
    char **name;
 
    int groups;
    int *group_size;
    int *group_offset;
} tree;
 
tree *read_tree(char *filename);
void hierarchy_predictions(float *predictions, int n, tree *hier, int only_leaves);
void change_leaves(tree *t, char *leaf_list);
float get_hierarchy_probability(float *x, tree *hier, int c);
 
#endif