AttentionFlowSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Neural

Attention Flow based Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Attention flow measures how “attention” spreads from the output back to input features through a graph of feature interactions. Features that receive more attention flow are considered more important. This captures both direct and indirect feature contributions.

How It Works

Selects features using attention flow analysis, which tracks how attention propagates through feature interactions.

Constructors

Constructor Summary
AttentionFlowSelector(int nFeaturesToSelect, int nIterations, int[] columnIndices)

Properties

Property Summary
Vector<T> AttentionScores { get; }
bool SupportsInverseTransform { get; }
int NFeaturesToSelect { get; }
int NIterations { 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)