I trained a machine learning model with XGBoost and I needed to interpret model using eli5 to get the local feature contribution. However, when I use the eli5 API
eli5.explain_prediction_df(clf, sub_feature_df.iloc[0, :], top=21), it returned the following error:
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
I looked up online but it seems that no one has had this error before.