Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C-code generated from XGBoost model includes "None #182

Closed
robinvanemden opened this issue Mar 20, 2020 · 0 comments
Closed

C-code generated from XGBoost model includes "None #182

robinvanemden opened this issue Mar 20, 2020 · 0 comments

Comments

@robinvanemden
Copy link

When running the following code:

from xgboost import XGBRegressor
from sklearn import datasets
import m2cgen as m2c

iris_data = datasets.load_iris(return_X_y=True)

mod = XGBRegressor()
X, y = iris_data
mod.fit(X, y)

code = m2c.export_to_c(mod)

print(code)

the printed c code includes a Pythonesque None :

...
 return (((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((None) + (var0)) +
 (var1)) + (var2)) + (var3)) + (var4)) + (var5)) + (var6)) +
 (var7)) + (var8)) + (var9)) + (var10)) + (var11)) + (var12)) +  ...
... 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant