SurrogateExplanation<T>

Models & Types · AiDotNet.Interpretability.Explainers

Represents a global surrogate model explanation.

Constructors

Constructor Summary
SurrogateExplanation(Vector<T> coefficients, T intercept, T fidelity, string[] featureNames) Initializes a new surrogate explanation.

Properties

Property Summary
T Fidelity { get; } Gets the fidelity (R²) indicating how well the surrogate approximates the black box.
T Intercept { get; } Gets the intercept of the linear surrogate model.
Vector<T> Coefficients { get; } Gets the coefficients of the linear surrogate model.
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 according to the surrogate model.
string ToString() Returns a human-readable summary.