Skip to content

Commit

Permalink
Feat(models): add sklearn and xgboost model examples (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
FogDong authored Sep 21, 2020
1 parent 5528529 commit da435fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Binary file added examples/SKLearn-model/model/model.joblib
Binary file not shown.
2 changes: 2 additions & 0 deletions examples/SKLearn-model/ormbfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
author: "Fog Dong <dongtainxin.dongtx@bytedance.com>"
format: SKLearn
1 change: 1 addition & 0 deletions examples/XGBoost-model/model/model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"learner":{"attributes":{},"gradient_booster":{"model":{"gbtree_model_param":{"num_trees":"2","size_leaf_vector":"0"},"tree_info":[0,0],"trees":[{"base_weights":[-7.15052932500839233e-02,1.29551589488983154e+00,-1.86661934852600098e+00,1.71217715740203857e+00,-1.70044052600860596e+00,-1.94070863723754883e+00,1.85964918136596680e+00],"default_left":[true,true,true,false,false,false,false],"id":0,"leaf_child_counts":[0,0,0,0,0,0,0],"left_children":[1,3,5,-1,-1,-1,-1],"loss_changes":[4.00053100585937500e+03,1.15821203613281250e+03,1.98173828125000000e+02,0.00000000000000000e+00,0.00000000000000000e+00,0.00000000000000000e+00,0.00000000000000000e+00],"parents":[2147483647,0,0,1,1,2,2],"right_children":[2,4,6,-1,-1,-1,-1],"split_conditions":[-9.53674316406250000e-07,-9.53674316406250000e-07,-9.53674316406250000e-07,1.71217715740203857e+00,-1.70044052600860596e+00,-1.94070863723754883e+00,1.85964918136596680e+00],"split_indices":[28,55,108,0,0,0,0],"sum_hessian":[1.62825000000000000e+03,9.24500000000000000e+02,7.03750000000000000e+02,8.12000000000000000e+02,1.12500000000000000e+02,6.90500000000000000e+02,1.32500000000000000e+01],"tree_param":{"num_deleted":"0","num_feature":"126","num_nodes":"7","size_leaf_vector":"0"}},{"base_weights":[-9.31910648941993713e-02,7.82926455140113831e-02,-6.23624467849731445e+00,7.84717559814453125e-01,-9.68530356884002686e-01],"default_left":[true,true,false,false,false],"id":1,"leaf_child_counts":[0,0,0,0,0],"left_children":[1,3,-1,-1,-1],"loss_changes":[8.32545043945312500e+02,5.69725097656250000e+02,0.00000000000000000e+00,0.00000000000000000e+00,0.00000000000000000e+00],"parents":[2147483647,0,0,1,1],"right_children":[2,4,-1,-1,-1],"split_conditions":[-9.53674316406250000e-07,-9.53674316406250000e-07,-6.23624467849731445e+00,7.84717559814453125e-01,-9.68530356884002686e-01],"split_indices":[59,28,0,0,0],"sum_hessian":[7.88852050781250000e+02,7.68389709472656250e+02,2.04623889923095703e+01,4.58936859130859375e+02,3.09452819824218750e+02],"tree_param":{"num_deleted":"0","num_feature":"126","num_nodes":"5","size_leaf_vector":"0"}}]},"name":"gbtree"},"learner_model_param":{"base_score":"0.500000","num_class":"0","num_feature":"126"},"objective":{"name":"binary:logistic","reg_loss_param":{"scale_pos_weight":"1"}}},"version":[1,1,1]}
2 changes: 2 additions & 0 deletions examples/XGBoost-model/ormbfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
author: "Fog Dong <dongtainxin.dongtx@bytedance.com>"
format: XGBoost

0 comments on commit da435fe

Please sign in to comment.