DropColumnImportance<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.ModelAgnostic

Drop-Column Importance for model-agnostic feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ DropColumnImportance<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

This method is like permutation importance but more definitive. Instead of scrambling a feature, it completely removes it and retrains the model. If the model gets much worse without a feature, that feature was truly important.

How It Works

Drop-Column Importance measures feature importance by removing each feature entirely and measuring how much model performance degrades. This is more thorough than permutation but requires retraining the model for each feature.

Constructors

Constructor Summary
DropColumnImportance(int nFeaturesToSelect, Func<Matrix<T>, Vector<T>, T> scorer, int[] columnIndices)

Properties

Property Summary
Vector<T> ImportanceScores { 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)