bosk 0.1.0

Pure-Rust LightGBM inference: parses the text model format directly — no FFI, zero deps. Optional ONNX Runtime and CatBoost backends behind the same small Model trait.
Documentation
tree
version=v4
num_class=1
num_tree_per_iteration=1
label_index=0
max_feature_idx=4
objective=binary sigmoid:1
feature_names=Column_0 Column_1 Column_2 Column_3 Column_4
feature_infos=[-3.0637798663123958:3.0647280378947759] [-3.143666302024744:4.0258240427272645] [-4.3891145848648367:3.4359276159845202] [-3.2632667025240267:3.2938541083681483] [-3.6484128252147836:3.2334936632485123]
tree_sizes=754 874 861 868 871 870 871 867

Tree=0
num_leaves=7
num_cat=0
split_feature=0 1 0 1 0 0
split_gain=734.714 222.569 130.309 77.8019 63.6894 49.3796
threshold=0.23234901897188073 -0.71323407830637986 -0.83663094169234931 0.75505683422507197 0.71803674782211324 -0.12043474541362205
decision_type=2 2 2 2 2 2
left_child=1 2 -1 -2 -5 -3
right_child=3 5 -4 4 -6 -7
leaf_value=-0.39600000000000002 0.52581143740340031 -0.53480176211453745 0.45573770491803273 -0.38507462686567162 0.3622641509433962 -0.20555555555555557
leaf_weight=25 161.75 170.25 45.75 16.75 26.5 54
leaf_count=100 647 681 183 67 106 216
internal_value=-0.006 -0.309153 0.15477 0.430244 0.0728324 -0.455518
internal_weight=500 295 70.75 205 43.25 224.25
internal_count=2000 1180 283 820 173 897
is_linear=0
shrinkage=0.3


Tree=1
num_leaves=7
num_cat=0
split_feature=0 1 1 0 0 1
split_gain=397.205 114.577 87.0465 76.2094 45.1939 16.8677
threshold=-0.038707091876100816 0.37844300992504659 -0.66182476962739789 0.55525295522670337 -0.73268671927626861 -1.7009335847387368
decision_type=2 2 2 2 2 2
left_child=2 -2 4 -3 5 -1
right_child=1 3 -4 -5 -6 -7
leaf_value=0.21313303201040862 0.41342383822251216 -0.31831780769402501 -0.40063007138866302 0.24347202325663089 0.27585895544228234 -0.36059470066647697
leaf_weight=5.7528249621391323 157.54384922981262 40.213671445846558 167.78518691658974 47.286852568387985 30.587523609399796 23.256134778261185
leaf_count=24 669 166 717 198 129 97
internal_value=-0.00443919 0.260543 -0.290005 -0.0147165 0.0214429 -0.246818
internal_weight=472.426 245.044 227.382 87.5005 59.5965 29.009
internal_count=2000 1033 967 364 250 121
is_linear=0
shrinkage=0.3


Tree=2
num_leaves=7
num_cat=0
split_feature=0 1 0 1 0 1
split_gain=239.211 90.0103 71.4054 44.3 18.3568 17.232
threshold=0.23234901897188073 -0.11834208269330386 -0.62375608789872394 1.390415889930446 1.1302885795960429 -1.1583174031125927
decision_type=2 2 2 2 2 2
left_child=1 2 5 -2 -5 -1
right_child=3 -3 -4 4 -6 -7
leaf_value=0.011244147916795516 0.31452803136113744 -0.35241939210334522 0.23470041154510937 -0.4810348820571263 0.20100536146940759 -0.35617843908736119
leaf_weight=16.637831687927246 158.07767483592033 138.68535417318344 59.438999772071838 9.3953448832035047 5.710013583302497 37.115162372589111
leaf_count=73 754 658 272 41 25 177
internal_value=-0.00378647 -0.190401 0.00810848 0.267625 -0.223215 -0.242452
internal_weight=425.06 251.877 113.192 173.183 15.1054 53.753
internal_count=2000 1180 522 820 66 250
is_linear=0
shrinkage=0.3


Tree=3
num_leaves=7
num_cat=0
split_feature=0 1 0 1 0 1
split_gain=151.04 68.8355 37.5584 37.5429 20.8497 13.8212
threshold=-0.15092888476192814 0.30781086359785609 0.781640960263425 -0.90645250437527236 -0.97836931194112176 0.97921334119658654
decision_type=2 2 2 2 2 2
left_child=3 -2 5 4 -1 -3
right_child=1 2 -4 -5 -6 -7
leaf_value=-0.21290849793617578 0.30346207521018026 -0.055828684863779156 0.2262415152924851 -0.30087620050181307 0.24750061386192859 -0.3491593727066224
leaf_weight=15.701085880398749 125.8590676933527 34.131263539195061 31.297602668404579 125.52166722714901 20.294047743082047 25.079843103885651
leaf_count=73 686 159 155 709 98 120
internal_value=-0.00390247 0.159968 -0.0395713 -0.223423 0.04667 -0.180074
internal_weight=377.885 216.368 90.5087 161.517 35.9951 59.2111
internal_count=2000 1120 434 880 171 279
is_linear=0
shrinkage=0.3


Tree=4
num_leaves=7
num_cat=0
split_feature=0 1 1 0 0 1
split_gain=93.2677 42.2948 32.7422 26.6699 14.5449 12.5056
threshold=0.16256239293776484 -0.11834208269330386 0.37844300992504659 -0.73268671927626861 1.2597418548919894 1.3287197006143603
decision_type=2 2 2 2 2 2
left_child=1 3 -2 -1 5 -4
right_child=2 -3 4 -5 -6 -7
leaf_value=-0.19328152253988037 0.29910375070370582 -0.28343571737122886 0.02372565617936721 0.13549871874988778 0.31484414447109549 -0.33076597368145205
leaf_weight=37.428315535187721 83.778234645724297 95.212474331259727 38.098884582519531 54.594151437282562 11.489484831690786 11.709066942334173
leaf_count=219 566 619 184 286 64 62
internal_value=-0.00336023 -0.143261 0.177195 0.00177387 0.0105772 -0.0596098
internal_weight=332.311 187.235 145.076 92.0225 61.2974 49.808
internal_count=2000 1124 876 505 310 246
is_linear=0
shrinkage=0.3


Tree=5
num_leaves=7
num_cat=0
split_feature=0 1 0 1 0 1
split_gain=61.0509 35.3158 22.4785 22.2209 11.5279 8.27836
threshold=-0.15092888476192814 -0.24629264776224355 0.64181926748292539 -0.91625004170984148 -1.3210300981782912 1.7306846925373154
decision_type=2 2 2 2 2 2
left_child=3 -2 -3 4 -1 -4
right_child=1 2 5 -5 -6 -7
leaf_value=-0.25651828378534725 0.30660807074873303 -0.094575665571892689 0.21672221909752021 -0.23517029144632029 0.16753789055727478 -0.22227563082347801
leaf_weight=7.7333924770355251 56.98097313195467 66.745080076158047 42.460040241479874 93.58622957020998 22.720295920968056 4.2532615810632697
leaf_count=42 440 372 287 712 126 21
internal_value=-0.00261799 0.113912 0.0171356 -0.162738 0.0598533 0.176751
internal_weight=294.479 170.439 113.458 124.04 30.4537 46.7133
internal_count=2000 1120 680 880 168 308
is_linear=0
shrinkage=0.3


Tree=6
num_leaves=7
num_cat=0
split_feature=0 1 0 1 1 0
split_gain=39.3341 24.9062 16.9821 16.8181 12.5516 7.35935
threshold=-0.47806191854186025 -0.30120584234862841 0.781640960263425 -1.7009335847387368 1.2349204718144138 -1.0183657349590469
decision_type=2 2 2 2 2 2
left_child=3 -2 4 -1 -3 -5
right_child=1 2 -4 5 -6 -7
leaf_value=0.28394905458599512 0.23088997609932532 -0.022593446581202634 0.17848483658662848 -0.32190552636196185 -0.32912440042799646 -0.12675813422811519
leaf_weight=6.3507370054721823 60.528519608080387 78.500187069177628 33.943259201943874 35.40454038977623 14.196634560823439 34.185956828296185
leaf_count=31 516 488 257 326 107 275
internal_value=-0.00128936 0.0725962 -0.00306137 -0.183392 -0.069539 -0.22604
internal_weight=263.11 187.169 126.64 75.9412 92.6968 69.5905
internal_count=2000 1368 852 632 595 601
is_linear=0
shrinkage=0.3


Tree=7
num_leaves=7
num_cat=0
split_feature=0 1 1 2 3 0
split_gain=25.9585 17.3084 16.5197 12.9614 21.1614 9.54098
threshold=0.21296160935827899 -0.49002416103358498 0.2832145288276775 -1.6021245271326239 -0.059761439128190021 -1.4012514458906942
decision_type=2 2 2 2 2 2
left_child=1 5 -2 4 -3 -1
right_child=2 3 -4 -5 -6 -7
leaf_value=-0.2601977547796816 0.25031179075576027 0.83302171688430116 0.0026562284495487572 -0.19079825535949416 -0.34832438282981293 0.10991171893011266
leaf_weight=7.3250928819179526 45.157966114580631 2.9410044774413109 52.333776734769344 85.450377635657787 2.5461558029055587 43.46588023006916
leaf_count=59 519 22 317 764 25 294
internal_value=-0.00178384 -0.0837468 0.11737 -0.162098 0.284853 0.0565344
internal_weight=239.22 141.729 97.4917 90.9375 5.48716 50.791
internal_count=2000 1164 836 811 47 353
is_linear=0
shrinkage=0.3


end of trees

feature_importances:
Column_0=24
Column_1=22
Column_2=1
Column_3=1

parameters:
[boosting: gbdt]
[objective: binary]
[metric: binary_logloss]
[tree_learner: serial]
[device_type: cpu]
[data_sample_strategy: bagging]
[data: ]
[valid: ]
[num_iterations: 8]
[learning_rate: 0.3]
[num_leaves: 7]
[num_threads: 1]
[seed: 0]
[deterministic: 1]
[force_col_wise: 0]
[force_row_wise: 0]
[histogram_pool_size: -1]
[max_depth: -1]
[min_data_in_leaf: 20]
[min_sum_hessian_in_leaf: 0.001]
[bagging_fraction: 1]
[pos_bagging_fraction: 1]
[neg_bagging_fraction: 1]
[bagging_freq: 0]
[bagging_seed: 7719]
[bagging_by_query: 0]
[feature_fraction: 1]
[feature_fraction_bynode: 1]
[feature_fraction_seed: 2437]
[extra_trees: 0]
[extra_seed: 11797]
[early_stopping_round: 0]
[early_stopping_min_delta: 0]
[first_metric_only: 0]
[max_delta_step: 0]
[lambda_l1: 0]
[lambda_l2: 0]
[linear_lambda: 0]
[min_gain_to_split: 0]
[drop_rate: 0.1]
[max_drop: 50]
[skip_drop: 0.5]
[xgboost_dart_mode: 0]
[uniform_drop: 0]
[drop_seed: 21238]
[top_rate: 0.2]
[other_rate: 0.1]
[min_data_per_group: 100]
[max_cat_threshold: 32]
[cat_l2: 10]
[cat_smooth: 10]
[max_cat_to_onehot: 4]
[top_k: 20]
[monotone_constraints: ]
[monotone_constraints_method: basic]
[monotone_penalty: 0]
[feature_contri: ]
[forcedsplits_filename: ]
[refit_decay_rate: 0.9]
[cegb_tradeoff: 1]
[cegb_penalty_split: 0]
[cegb_penalty_feature_lazy: ]
[cegb_penalty_feature_coupled: ]
[path_smooth: 0]
[interaction_constraints: ]
[verbosity: -1]
[saved_feature_importance_type: 0]
[use_quantized_grad: 0]
[num_grad_quant_bins: 4]
[quant_train_renew_leaf: 0]
[stochastic_rounding: 1]
[linear_tree: 0]
[max_bin: 255]
[max_bin_by_feature: ]
[min_data_in_bin: 3]
[bin_construct_sample_cnt: 200000]
[data_random_seed: 38]
[is_enable_sparse: 1]
[enable_bundle: 1]
[use_missing: 1]
[zero_as_missing: 0]
[feature_pre_filter: 1]
[pre_partition: 0]
[two_round: 0]
[header: 0]
[label_column: ]
[weight_column: ]
[group_column: ]
[ignore_column: ]
[categorical_feature: ]
[forcedbins_filename: ]
[precise_float_parser: 0]
[parser_config_file: ]
[objective_seed: 8855]
[num_class: 1]
[is_unbalance: 0]
[scale_pos_weight: 1]
[sigmoid: 1]
[boost_from_average: 0]
[reg_sqrt: 0]
[alpha: 0.9]
[fair_c: 1]
[poisson_max_delta_step: 0.7]
[tweedie_variance_power: 1.5]
[lambdarank_truncation_level: 30]
[lambdarank_norm: 1]
[label_gain: ]
[lambdarank_position_bias_regularization: 0]
[eval_at: ]
[multi_error_top_k: 1]
[auc_mu_weights: ]
[num_machines: 1]
[local_listen_port: 12400]
[time_out: 120]
[machine_list_filename: ]
[machines: ]
[gpu_platform_id: -1]
[gpu_device_id: -1]
[gpu_use_dp: 0]
[num_gpu: 1]

end of parameters

pandas_categorical:null