dmitryikh / leaves

pure Go implementation of prediction part for GBRT (Gradient Boosting Regression Trees) models from popular frameworks
MIT License
419 stars 72 forks source link

fix transformation for xgboost model #77

Open shanghuiyang opened 3 years ago

shanghuiyang commented 3 years ago

This patch fixes the transformation while loading an xgboost model file. When the model file is saved from an xgboost model with param "objective= 'multi:softprob'" or "objective= 'multi:softmax'", the loaded model should use TransformSoftmax rather than TransformRaw. This patch works well on my xgboost model.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 165


Changes Missing Coverage Covered Lines Changed/Added Lines %
xgensemble_io.go 1 2 50.0%
<!-- Total: 1 2 50.0% -->
Totals Coverage Status
Change from base Build 159: -0.05%
Covered Lines: 1798
Relevant Lines: 2621

💛 - Coveralls
nikolaydubina commented 3 years ago

cc: @dmitryikh