TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.74k stars 332 forks source link

Line in unexpected format #364

Open scottwthompson opened 4 years ago

scottwthompson commented 4 years ago

Python version 3.7.3 xgboost version 0.82

    input = pd.DataFrame([datum])
    prediction_html = show_prediction(
       xgb_model,
        input,
        feature_names=feature_names,
        targets=[True],
        show_feature_values=True
    )

>>> 

ValueError: Line in unexpected format:      5:[has_transacted] yes=11,no=12,gain=336.531525,cover=32763.1055

The actual model predicts with the same inputs. Any advice? is xgboost 0.82 supported?

The feature in question causing the error is boolean.

scottwthompson commented 4 years ago

Also, I was getting this library to work just fine with the exact same code. But then I changed my model artifact to include this boolean feature and it stopped working.

So don't think its an issue with my code so much.

giffordjoe commented 1 year ago

I believe the issue is having booleans in the input. when i casted my boolean columns to integers everything works as normal.

My guess is XGBoost is doing this conversion under the hood and the eli5 library is not.