interpret_community.widget.explanation_dashboard_input module

Defines the Explanation dashboard class.

class interpret_community.widget.explanation_dashboard_input.ExplanationDashboardInput(explanation, model=None, dataset=None, true_y=None, classes=None, features=None, predict_url=None, locale=None, with_credentials=False)

Bases: object

Represents an explanation as all the pieces that can be serialized and passed to JavaScript.

Parameters:
  • explanation (ExplanationMixin) – An object that represents an explanation.
  • model (object) – An object that represents a model. It is assumed that for the classification case it has a method of predict_proba() returning the prediction probabilities for each class and for the regression case a method of predict() returning the prediction value.
  • dataset (numpy.array or list[][]) – A matrix of feature vector examples (# examples x # features), the same samples used to build the explanation. Will overwrite any set on explanation object already
  • true_y (numpy.array or list[]) – The true labels for the provided dataset. Will overwrite any set on explanation object already.
  • classes (numpy.array or list[]) – The class names.
  • features (numpy.array or list[]) – Feature names.
enable_predict_url()
on_predict(data)