Skip to content

Instantly share code, notes, and snippets.

@schaunwheeler
Created April 19, 2019 13:21
Show Gist options
  • Save schaunwheeler/f05577fb7816005516f87152be1a8968 to your computer and use it in GitHub Desktop.
Save schaunwheeler/f05577fb7816005516f87152be1a8968 to your computer and use it in GitHub Desktop.
Example JSON output for single tree of RandomForestRegressor
{
"i": 0,
"tree_undefined": -2,
"features": [
3,
3,
2,
3,
-2,
-2,
-2,
0,
2,
0,
2,
-2,
-2,
-2,
-2,
0,
-2,
-2,
-2
],
"thresholds": [
4.5,
3.5,
33768144.0,
6.5,
-2.0,
-2.0,
-2.0,
1549029605376.0,
-77179120.0,
1549032226816.0,
-77114288.0,
-2.0,
-2.0,
-2.0,
-2.0,
1548996575232.0,
-2.0,
-2.0,
-2.0
],
"children_left": [
1,
5,
3,
7,
-1,
-1,
-1,
13,
9,
15,
11,
-1,
-1,
-1,
-1,
17,
-1,
-1,
-1
],
"children_right": [
2,
6,
4,
8,
-1,
-1,
-1,
14,
10,
16,
12,
-1,
-1,
-1,
-1,
18,
-1,
-1,
-1
],
"values": [
0.6594487000000075,
0.9145625756475672,
0.4798822627364122,
0.4834432568050591,
0.06377510040160636,
0.9691637515674878,
0.8829381857104491,
0.459183710313877,
0.5318811473299319,
0.5112735667564436,
0.6158954248366034,
0.8693743372216338,
0.5329562803608617,
0.4425310059715218,
0.4805052049638307,
0.48827073070607685,
0.5495880341880378,
0.5426929092805026,
0.45293500338523907
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment