KnockoffFilter<T>

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

Knockoff Filter for false discovery rate control in feature selection.

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

Implements: ISupervisedFeatureSelector<T>

For Beginners

Knockoffs are fake features designed to compete with real ones. If a real feature beats its knockoff, it’s likely important. This controls how many false positives sneak into your selection.

How It Works

The Knockoff Filter creates “knockoff” copies of features that mimic their correlation structure but are independent of the target. Features whose importance exceeds their knockoffs’ importance are selected.

This method provides FDR (False Discovery Rate) control, guaranteeing that the expected proportion of false discoveries is below a specified threshold.

Constructors

Constructor Summary
KnockoffFilter(double fdr, Func<Matrix<T>, Vector<T>, Vector<T>> importanceFunc, int? randomState, int[] columnIndices)

Properties

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