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
Hi, issue I am experiencing is very similar to issue in #1797. I can't use lgb.plot_tree as it always crashes on parsing JSON file. I have about 90 features, from which when I print out LightGBMRegressor feature_importance, about 50 are used in prediction making.
Environment info
Operating System: Ubuntu 18.04
LightGBM version: 2.2.3 installed via pip
Error message
This is the message I receive in logs:
....
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 26 column 14 (char 2057)
Somehow after fitting LightGBM generates invalid JSON file:
Why split_gain value is nan as it is invalid JSON value?
gbm = lgb.LGBMRegressor()
gbm_fitted = gbm.fit(X_train, y_train,
eval_set=[(X_val, y_val)],
eval_metric='rmse',
early_stopping_rounds=20, feature_name=column_names)
... plotting features, importances...
lgb.plot_tree(gbm_fitted) # <- this is where I receive error
Interesting part is that XGBoost plot_tree with same data after training is able to plot decision tree perfectly.
What could I do to make LGBM plot this tree?
The text was updated successfully, but these errors were encountered:
Issue
Hi, issue I am experiencing is very similar to issue in #1797. I can't use lgb.plot_tree as it always crashes on parsing JSON file. I have about 90 features, from which when I print out LightGBMRegressor feature_importance, about 50 are used in prediction making.
Environment info
Operating System: Ubuntu 18.04
LightGBM version: 2.2.3 installed via pip
Error message
This is the message I receive in logs:
Somehow after fitting LightGBM generates invalid JSON file:
Why split_gain value is nan as it is invalid JSON value?
Interesting part is that XGBoost plot_tree with same data after training is able to plot decision tree perfectly.
What could I do to make LGBM plot this tree?
The text was updated successfully, but these errors were encountered: