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
ConstructorDescriptionLIMEExplanation
(SparseModel<Regressor> model, 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.getModel()
Returns the explanining model.The original model's prediction which is being explained.double
Get the RMSE of a specific dimension of the explanation model.toString()
-
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
Description copied from interface:Explanation
Returns the names of the active features in this explanation.- Specified by:
getActiveFeatures
in interfaceExplanation<Regressor>
- Returns:
- The active feature names.
-
getModel
Description copied from interface:Explanation
Returns the explanining model.- Specified by:
getModel
in interfaceExplanation<Regressor>
- Returns:
- The explanation model.
-
getPrediction
Description copied from interface:Explanation
The original model's prediction which is being explained.- Specified by:
getPrediction
in 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
-