Class LIMEExplanation

All Implemented Interfaces:
Serializable, Explanation<Regressor>

public class LIMEExplanation extends Object implements Explanation<Regressor>
An Explanation using LIME.

Wraps a SparseModel Regressor which is trained to predict the probabilities generated by the true Model.


 Ribeiro MT, Singh S, Guestrin C.
 "Why should I trust you?: Explaining the predictions of any classifier"
 Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 2016.
See Also:
  • Constructor Details

    • LIMEExplanation

      public LIMEExplanation(SparseModel<Regressor> model, Prediction<Label> prediction, RegressionEvaluation evaluation)
      Constructs a LIME explanation.
      model - The explanation model.
      prediction - The prediction being explained.
      evaluation - The evaluation of the explanation model on the sampled data.
  • Method Details

    • getActiveFeatures

      public List<String> getActiveFeatures()
      Description copied from interface: Explanation
      Returns the names of the active features in this explanation.
      Specified by:
      getActiveFeatures in interface Explanation<Regressor>
      The active feature names.
    • getModel

      public SparseModel<Regressor> getModel()
      Description copied from interface: Explanation
      Returns the explanining model.
      Specified by:
      getModel in interface Explanation<Regressor>
      The explanation model.
    • getPrediction

      public Prediction<Label> getPrediction()
      Description copied from interface: Explanation
      The original model's prediction which is being explained.
      Specified by:
      getPrediction in interface Explanation<Regressor>
      The original prediction.
    • getEvaluation

      public RegressionEvaluation getEvaluation()
      Gets the evaluator which scores how close the sparse model's predictions are to the complex model's predictions.
      The evaluation.
    • getRMSE

      public double getRMSE(String name)
      Get the RMSE of a specific dimension of the explanation model.
      name - The dimension to look at.
      The RMSE of the explanation model.
    • toString

      public String toString()
      toString in class Object