Skip to content
Advertisement

SHAP import local_accuracy

I’m trying to test metrics from the shap library https://github.com/slundberg/shap/blob/master/shap/benchmark/metrics.py

I tried calling metrics like this :

JavaScript

But am always getting the error :

JavaScript

Advertisement

Answer

Try instead:

JavaScript

Why? Inspecting package’s top level __init__.py you’ll find out the following commented line:

JavaScript
Advertisement