FRegression<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate

F-Regression for feature selection based on linear relationship with continuous target.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

For regression problems (predicting continuous values), we need to know which features have a linear relationship with what we’re predicting. F-regression fits a simple line between each feature and the target, then measures how well that line explains the variation in the target.

How It Works

Computes the F-statistic for a univariate linear regression between each feature and the continuous target. Features with higher F-statistics have stronger linear relationships with the target.

Constructors

Constructor Summary
FRegression(int nFeaturesToSelect, double pValueThreshold, int[] columnIndices)

Properties

Property Summary
Vector<T> FStatistics { get; }
Vector<T> PValues { get; }
Vector<T> RSquaredValues { 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)