FisherScore<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter
Fisher Score for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → FisherScore<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Imagine you’re sorting fruits by color. A good feature (like color) would make all apples similar to each other but different from oranges. Fisher Score measures exactly this: how much a feature groups similar items together while keeping different groups apart.
How It Works
Fisher Score measures the ratio of between-class variance to within-class variance. Features with high Fisher Scores have good class separability, meaning samples from different classes are far apart while samples from the same class are close together.
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) |