Class LIMEExplanation
java.lang.Object
org.tribuo.classification.explanations.lime.LIMEExplanation
- All Implemented Interfaces:
Serializable,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 Summary
ConstructorsConstructorDescriptionLIMEExplanation(org.tribuo.SparseModel<Regressor> model, org.tribuo.Prediction<Label> prediction, RegressionEvaluation evaluation) Constructs a LIME explanation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the names of the active features in this explanation.Gets the evaluator which scores how close the sparse model's predictions are to the complex model's predictions.org.tribuo.SparseModel<Regressor>getModel()Returns the explanining model.org.tribuo.Prediction<Label>The original model's prediction which is being explained.doubleGet the RMSE of a specific dimension of the explanation model.toString()
-
Constructor Details
-
LIMEExplanation
public LIMEExplanation(org.tribuo.SparseModel<Regressor> model, org.tribuo.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
Description copied from interface:ExplanationReturns the names of the active features in this explanation.- Specified by:
getActiveFeaturesin interfaceExplanation<Regressor>- Returns:
- The active feature names.
-
getModel
Description copied from interface:ExplanationReturns the explanining model.- Specified by:
getModelin interfaceExplanation<Regressor>- Returns:
- The explanation model.
-
getPrediction
Description copied from interface:ExplanationThe original model's prediction which is being explained.- Specified by:
getPredictionin interfaceExplanation<Regressor>- Returns:
- The original prediction.
-
getEvaluation
Gets the evaluator which scores how close the sparse model's predictions are to the complex model's predictions.- Returns:
- The evaluation.
-
getRMSE
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
-