MCPcopy Create free account
hub / github.com/dmlc/xgboost / GetModelStr

Function GetModelStr

tests/cpp/common/test_json.cc:23–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace xgboost {
22
23std::string GetModelStr() {
24 std::string model_json = R"json(
25{
26 "model_parameter": {
27 "base_score": "0.5",
28 "num_class": "0",
29 "num_feature": "10"
30 },
31 "train_parameter": {
32 "debug_verbose": "0",
33 "disable_default_eval_metric": "0",
34 "nthread": "0",
35 "seed": "0",
36 "seed_per_iteration": "0",
37 "test_flag": "",
38 "tree_method": "gpu_hist"
39 },
40 "configuration": {
41 "booster": "gbtree",
42 "gpu_id": "0",
43 "num_class": "0",
44 "num_feature": "10",
45 "objective": "reg:linear",
46 "tree_method": "gpu_hist",
47 "updater": "grow_gpu_hist"
48 },
49 "objective": "reg:linear",
50 "booster": "gbtree",
51 "gbm": {
52 "GBTreeModelParam": {
53 "num_feature": "10",
54 "num_output_group": "1",
55 "num_roots": "1",
56 "size_leaf_vector": "0"
57 },
58 "trees": [{
59 "TreeParam": {
60 "num_feature": "10",
61 "num_roots": "1",
62 "size_leaf_vector": "0"
63 },
64 "num_nodes": "9",
65 "nodes": [
66 {
67 "depth": 0,
68 "gain": 31.8892,
69 "hess": 10,
70 "left": 1,
71 "missing": 1,
72 "nodeid": 0,
73 "right": 2,
74 "split_condition": 0.580717,
75 "split_index": 2
76 },
77 {
78 "depth": 1,
79 "gain": 1.5625,
80 "hess": 3,

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected