You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m try using m2cgen to generate js code for XGBoost model,but find that if the feature input include zero,the result which calculate by generated js has a big difference with the result which predicted by model. For example, if the feature input is [0.4444,0.55555,0.3545,0.22333],the result which calculate by generated js equals the result which predicted by model,but if the feature input is [0.4444,0,0,0.22333],the result which calculate by generated js will be very different from the result which predicted by model,maybe one result is 0.22 ,the other one result is 0.04。After we validate by demo,we find that m2cgen not process “missing” condition. when xgboost result in “missing”, m2cgen will process it as “yes”
The text was updated successfully, but these errors were encountered:
Can you please provide some steps to reproduce this behavior?
If I recall the notion of the "missing" value in XGBoost correctly, then 0 - is not a missing value, 0 is just a zero value. "Missing" values are considered to be NaNs. Am I wrong here?
Are you sure you're not hitting the other issue with XGBoost - #168 ?
Thanks.
UPD: Have you tried passing the JavaScript NaN instead of 0?
Closing this due to the lack of details and in a hope that this is a duplicate of #168. @crystaldan please feel free to reopen this if the problem persists in version 0.7.0 and onward.
I’m try using m2cgen to generate js code for XGBoost model,but find that if the feature input include zero,the result which calculate by generated js has a big difference with the result which predicted by model. For example, if the feature input is [0.4444,0.55555,0.3545,0.22333],the result which calculate by generated js equals the result which predicted by model,but if the feature input is [0.4444,0,0,0.22333],the result which calculate by generated js will be very different from the result which predicted by model,maybe one result is 0.22 ,the other one result is 0.04。After we validate by demo,we find that m2cgen not process “missing” condition. when xgboost result in “missing”, m2cgen will process it as “yes”
The text was updated successfully, but these errors were encountered: