ImageFeatureSelector<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.DomainSpecific
Feature selection for image data.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → ImageFeatureSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Images have special structure - nearby pixels are usually similar. This selector understands that and picks features while considering their spatial relationships. It’s like choosing representative spots on a photo rather than random pixels.
How It Works
ImageFeatureSelector is designed for selecting features from image data, considering spatial locality and the correlation patterns typical of image features. It can handle flattened image data and respects the original image structure.
Constructors
| Constructor | Summary |
|---|---|
ImageFeatureSelector(int nFeaturesToSelect, int imageWidth, int imageHeight, int numChannels, bool useSpatialCorrelation, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
bool UseSpatialCorrelation { get; } |
|
int ImageHeight { get; } |
|
int ImageWidth { get; } |
|
int NFeaturesToSelect { get; } |
|
int NumChannels { 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) |