BayesianFeatureSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Bayesian

Bayesian Feature Selection using posterior probability.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → BayesianFeatureSelector<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Bayesian methods treat feature relevance as a probability question. Instead of saying “feature X is important” or “not important”, we say “there’s a 90% chance feature X is important.” This gives us uncertainty estimates and allows us to incorporate prior knowledge about which features might be relevant.

How It Works

Uses Bayesian inference to compute the posterior probability that each feature is relevant to the target. Features with high posterior probability are selected.

Constructors

Constructor Summary
BayesianFeatureSelector(int nFeaturesToSelect, double priorProbability, double threshold, int[] columnIndices)

Properties

Property Summary
Vector<T> PosteriorProbabilities { get; }
bool SupportsInverseTransform { get; }
double PriorProbability { 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)