SingleCounterfactual<T>
Models & Types · AiDotNet.Interpretability.Explainers
Represents a single counterfactual explanation.
Constructors
| Constructor |
Summary |
SingleCounterfactual(Vector<T> counterfactualInstance, T prediction, List<FeatureChange<T>> changes, T distance) |
Initializes a new single counterfactual. |
Properties
| Property |
Summary |
IReadOnlyList<FeatureChange<T>> Changes { get; } |
Features that were changed. |
T Distance { get; } |
Normalized distance from original. |
T Prediction { get; } |
Prediction for the counterfactual. |
Vector<T> CounterfactualInstance { get; } |
The counterfactual instance. |
int Sparsity { get; } |
Number of features changed. |
Methods
| Method |
Summary |
string ToString() |
Returns string representation. |