ReliefF<T>

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

ReliefF algorithm for feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

ReliefF works by looking at each data point and comparing it to its nearest neighbors. Features are scored based on how well they separate a point from neighbors of different classes while keeping it close to neighbors of the same class. It’s like finding features that cluster similar items together.

How It Works

ReliefF is an extension of the Relief algorithm that handles multi-class problems and uses k nearest neighbors. It evaluates features based on their ability to distinguish between instances of different classes.

Constructors

Constructor Summary
ReliefF(int nFeaturesToSelect, int nNeighbors, int nSamples, int? randomState, int[] columnIndices)

Properties

Property Summary
Vector<T> FeatureWeights { get; }
bool SupportsInverseTransform { get; }
int NFeaturesToSelect { get; }
int NNeighbors { get; }
int NSamples { 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)