Open CynthiaLong opened 2 years ago
FWIW, it works for me
eli5.show_prediction(clf,this_row, feature_names=feature_names, show_feature_values=True, top=20)
clf=<class 'lightgbm.basic.Booster'> this_row=<class 'pandas.core.series.Series'> feature_names=<class 'list'>
LightGBM version: 3.3.3 eli5 version: 0.13.0
When I call the function
explain_prediction_lightgbm
on my lightgbm booster model,eli5.lightgbm.explain_prediction_lightgbm(model1, doc=example, feature_names=list(example.index))
where model1 is<class 'lightgbm.basic.Booster'>
, example is<class 'pandas.core.series.Series'>
, andlist(example.index)
is a list of string of the data feature namesI encounter the following error: