LIMEExplanationResult<T>

Models & Types · AiDotNet.Interpretability.Explainers

Represents a LIME explanation result.

Constructors

Constructor Summary
LIMEExplanationResult(Vector<T> coefficients, T intercept, T prediction, T localR2, string[] featureNames) Initializes a new LIME explanation result.

Properties

Property Summary
T Intercept { get; } Gets the intercept of the local linear model.
T LocalR2 { get; } Gets the R² score of the local linear model (how well it fits locally).
T Prediction { get; } Gets the original prediction being explained.
Vector<T> Coefficients { get; } Gets the coefficients of the local linear model (feature weights).
int NumFeatures { get; } Gets the number of features.
string[] FeatureNames { get; } Gets the feature names, if available.

Methods

Method Summary
IEnumerable<ValueTuple<int, string, T>> GetSortedFeatures() Gets features sorted by absolute coefficient (most important first).
IEnumerable<ValueTuple<int, string, T>> GetTopFeatures(int n) Gets the top N most important features.
string ToString() Returns a human-readable summary.