Class LIMEExplanation

java.lang.Object
org.tribuo.classification.explanations.lime.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.

See:

 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.
      Parameters:
      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>
      Returns:
      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>
      Returns:
      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>
      Returns:
      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.
      Returns:
      The evaluation.
    • getRMSE

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

      public String toString()
      Overrides:
      toString in class Object