NaiveBayesSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Classification
Naive Bayes based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ NaiveBayesSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Naive Bayes assumes features are independent given the class. This selector measures how much each feature helps distinguish between classes by looking at how different the feature distributions are for each class.
How It Works
Selects features based on their discriminative power using Naive Bayes class-conditional probability estimates.
Constructors
| Constructor | Summary |
|---|---|
NaiveBayesSelector(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> DiscriminativePower { 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) |