HorseshoeSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Bayesian

Horseshoe Prior Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

The horseshoe prior is shaped like a horseshoe - most feature weights get pushed to zero (irrelevant), but truly important features are allowed to have large weights. It’s very good at finding sparse solutions where only a few features matter.

How It Works

Uses the horseshoe prior which has heavy tails (allowing large coefficients for important features) and infinite mass at zero (shrinking irrelevant features to exactly zero).

Constructors

Constructor Summary
HorseshoeSelector(int nFeaturesToSelect, int nIterations, double tau, int[] columnIndices)

Properties

Property Summary
bool SupportsInverseTransform { get; }
double[] PosteriorMeans { get; }
double[] ShrinkageFactors { 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)