ScoreCAMSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Neural
Score-CAM based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ ScoreCAMSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Unlike GradCAM which uses gradients, Score-CAM measures feature importance by masking each feature and observing how the prediction score changes. Features that cause larger score drops when masked are considered more important. This is more stable than gradient methods.
How It Works
Selects features using Score-CAM, a gradient-free class activation mapping method that uses forward passing scores instead of gradients.
Constructors
| Constructor | Summary |
|---|---|
ScoreCAMSelector(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> ScoreWeights { 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) |