Skip to content

Instantly share code, notes, and snippets.

@mesejo
Last active February 19, 2024 14:20
Show Gist options
  • Save mesejo/24d3bc6bcdba2a97fc6079b31cdb711f to your computer and use it in GitHub Desktop.
Save mesejo/24d3bc6bcdba2a97fc6079b31cdb711f to your computer and use it in GitHub Desktop.
Single Tree XGBoost Model
{
"learner": {
"attributes": {
"scikit_learn": "{\"_estimator_type\": \"classifier\"}"
},
"feature_names": [],
"feature_types": [],
"gradient_booster": {
"model": {
"gbtree_model_param": {
"num_parallel_tree": "1",
"num_trees": "1"
},
"iteration_indptr": [
0,
1
],
"tree_info": [
0
],
"trees": [
{
"base_weights": [
-3.3802866E-8,
1.8656437E0,
-1.538925E0,
1.9884424E-1,
7.401848E-2,
-1.7457907E-1,
-1.9638585E-2
],
"categories": [],
"categories_nodes": [],
"categories_segments": [],
"categories_sizes": [],
"default_left": [
0,
0,
0,
0,
0,
0,
0
],
"id": 0,
"left_children": [
1,
3,
5,
-1,
-1,
-1,
-1
],
"loss_changes": [
3.2697022E5,
7.1129688E3,
1.7331484E4,
0E0,
0E0,
0E0,
0E0
],
"parents": [
2147483647,
0,
0,
1,
1,
2,
2
],
"right_children": [
2,
4,
6,
-1,
-1,
-1,
-1
],
"split_conditions": [
-1.7919981E0,
-1.4326483E0,
1.6183813E0,
1.9884424E-1,
7.401848E-2,
-1.7457907E-1,
-1.9638585E-2
],
"split_indices": [
13,
11,
3,
0,
0,
0,
0
],
"split_type": [
0,
0,
0,
0,
0,
0,
0
],
"sum_hessian": [
1.1388182E5,
5.1476492E4,
6.2405332E4,
4.6411746E4,
5.0647466E3,
5.4073152E4,
8.332179E3
],
"tree_param": {
"num_deleted": "0",
"num_feature": "28",
"num_nodes": "7",
"size_leaf_vector": "1"
}
}
]
},
"name": "gbtree"
},
"learner_model_param": {
"base_score": "5.006873E-1",
"boost_from_average": "1",
"num_class": "0",
"num_feature": "28",
"num_target": "1"
},
"objective": {
"name": "binary:logistic",
"reg_loss_param": {
"scale_pos_weight": "578.876038"
}
}
},
"version": [
2,
0,
3
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment