NorskRegnesentral/shapr

shapr on xgboost classifier: `group` must be NULL or a list

sugarjo opened this issue · 1 comments

Hi Martin,
I tried to use shapr with the python wrapper on my data. I have trained xgboost classifiers. I tried to follow the xgboost-example, but experienced some issues which might be related?

  • I receive a warning: "Note: Feature classes extracted from the model contains NA. Assuming feature classes from the data are correct."
    How should I deal with this? I haven't any groups of features. Are feature classes and groups related? (see below)

My codes run into an error: "Error in feature_combinations(m = n_features0, exact = exact, n_combinations = n_combinations, :
Due to computational complexity, we recommend setting n_combinations = 10 000"

I set n_combinations=10000 and rerun the code:

  • I receive an error: "RRuntimeError: Error in get_parameters(approach = approach, prediction_zero = prediction_zero, : group must be NULL or a list"
    Is this related to the "NA feature classes"-warning above and how could I deal with this?
    I haven't defined any groups of features.

Thanks,
Jørgen

Hi

The first is just a warning/note, nothing to worry about. For the second issue is not related and it is hard to know without seeing your code, but if you tried to run the python version with groping, there was a bug there which was just fixed and merged into master #375
Please reinstall the latest version of shaprpy, and see if it solves your problem.

I am closing this now. Please reopen and provide a minimal working example if the problem persists.