using a trained boosting model in matlab
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a boosting regression model that has been trained using python, and I want to read the model in Matlab and use it for prediction. I don't have the deep learning toolbox and for this specific task, I can not call python through Matlab.
a trained model looks something like this (I removed feature names, feature info and the actual number of trees for readability):
tree
version=v2
num_class=1
num_tree_per_iteration=1
label_index=0
max_feature_idx=43
objective=regression_l1
feature_names=feature_1 ... feature_M
feature_infos=[feature_1_min:feature_1_max]...[feature_M_min:feature_M_max]
tree_sizes=tree_0_size ... tree_N_size
Tree=0
num_leaves=4
num_cat=0
split_feature=8 41 6
split_gain=498454 42849.9 39363.4
threshold=-9.4999999999999982 0.80130323767662059 -93.099506378173814
decision_type=2 2 2
left_child=2 -2 -1
right_child=1 -3 -4
leaf_value=-0.22684870120137932 -0.0063567292317748061 0.12475228909403085 -0.094960116110742093
leaf_count=361156 218908 351085 222136
internal_value=0 0.665046 -0.649885
internal_count=1153285 569993 583292
shrinkage=1
Tree=1
num_leaves=4
num_cat=0
split_feature=9 42 4
split_gain=476541 42391.7 40019.2
threshold=10.371099948883058 -0.85092586278915394 1.2349531054496767
decision_type=2 2 2
left_child=1 -1 -2
right_child=2 -3 -4
leaf_value=0.17211716407500208 -0.032555124533548953 0.044790033876523375 -0.16342578789032997
leaf_count=336891 165211 235997 415186
internal_value=0 0.646403 -0.639241
internal_count=1153285 572888 580397
shrinkage=0.01
...
Tree=N
num_leaves=4
num_cat=0
split_feature=8 9 41
split_gain=484566 43234.8 38827.9
threshold=-4.4999999999999991 89.511920928955092 0.84224075078964245
decision_type=2 2 2
left_child=1 -1 -2
right_child=2 -3 -4
leaf_value=-0.039807440089253521 0.045218650022099877 -0.17164923107102309 0.16946350076781358
leaf_count=226080 213732 370436 343037
internal_value=0 -0.627055 0.670112
internal_count=1153285 596516 556769
shrinkage=0.01
anny suggestion on how to read the model and use it is greatly appriciated
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!