MissingIndicator<T>

Models & Types · AiDotNet.Preprocessing.Imputers

Creates binary indicator features for missing values.

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

For Beginners

Sometimes knowing that data is missing is important:

  • A missing income might mean someone declined to answer (high income?)
  • A missing medical test might mean the doctor didn’t think it was necessary

This transformer adds new columns (one per feature) with 1 where data was missing and 0 where it was present.

How It Works

MissingIndicator transforms a dataset by adding binary columns that indicate where values were missing. This is useful when the fact that a value is missing is itself informative for the model.

Constructors

Constructor Summary
MissingIndicator(MissingIndicatorFeatures features, double missingValue, int[] columnIndices) Creates a new instance of MissingIndicator.

Properties

Property Summary
MissingIndicatorFeatures Features { get; } Gets which features to create indicators for.
bool SupportsInverseTransform { get; } Gets whether this transformer supports inverse transformation.
int[] FeaturesWithMissing { get; } Gets the indices of features that had missing values during fit.

Methods

Method Summary
string[] GetFeatureNamesOut(string[] inputFeatureNames) Gets the output feature names after transformation.