DropColumnImportance<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Embedded

Drop Column Importance feature selection by measuring score decrease when dropping features.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Instead of shuffling a feature (like permutation importance), you completely remove it and retrain the model from scratch. If the model performs much worse without a feature, that feature is important for learning. This is more thorough but also more computationally expensive since you retrain for each feature.

How It Works

Drop Column Importance measures the decrease in model performance when each feature is completely removed from the dataset and the model is retrained. Unlike permutation importance, this captures the feature’s contribution to model learning, not just prediction.

Constructors

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

Properties

Property Summary
T BaselineScore { get; }
Vector<T> Importances { 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)