FisherScore<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Spectral
Fisher Score for class-separability based feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → FisherScore<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
A good feature for classification should have values that are similar within each class but different across classes. Fisher Score captures this by comparing spread between vs within groups.
How It Works
Fisher Score measures how well a feature separates different classes. It’s the ratio of between-class variance to within-class variance. Higher scores indicate better class discrimination.
Constructors
| Constructor | Summary |
|---|---|
FisherScore(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FisherScores { 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) |