SaliencySelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Image

Saliency-based feature selection for image features.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → SaliencySelector<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Saliency measures how much a small change in each feature would affect the prediction. Features with high saliency are “sensitive” to changes, suggesting they’re important for the model’s decisions.

How It Works

Selects features based on gradient-based saliency, identifying features that contribute most to model predictions. Originally designed for neural network interpretability but adapted here for general feature selection.

Constructors

Constructor Summary
SaliencySelector(int nFeaturesToSelect, double epsilon, int[] columnIndices)

Properties

Property Summary
Vector<T> SaliencyScores { get; }
bool SupportsInverseTransform { get; }
int NFeaturesToSelect { get; }
int[] SelectedIndices { get; }

Methods

Method Summary
Matrix<T> FitTransform(Matrix<T> data, Vector<T> target)
bool[] GetSupportMask()
string[] GetFeatureNamesOut(string[] inputFeatureNames)
void Fit(Matrix<T> data, Vector<T> target)