dmitryikh / leaves

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

xgEnsemble prediction results are different from xgboost in python #50

Closed EleComb closed 5 years ago

EleComb commented 5 years ago

I traning and testing data with xgboost in python, then use leaves in production env. The more infos are there:

In Python xgb testing, The data structure that I set up with pd.DataFrame is [0:value1 1:v2, 2:v3, ... , n:v(n+1)] the value1 is any value int type. and v2, ... , v(n+1) is float64 type. The 0 is prediction value. This result is testing result.

And this structure: [feature1:v2, f2:v3, ... , f(n):v(n+1)] This result is NOT testing result.

In Golang and I use leaves XGEnsembleFromFile->model.PredictCSR() also the result is NOT testing result.

I have tried to find how to solve it for over 5h like add {0:0} to first features group, but for my ridiculous low English level and Math level I can't find it. What's wrong with my testing data = =

dmitryikh commented 5 years ago

Could you please provide golang code?

EleComb commented 5 years ago

I checked it again and found it seems my model was last version! = = Thank you dmitryikh! (....