Skip to main content

MissingIndicator

Converter
DashAI.back.converters.scikit_learn.MissingIndicator

Add binary indicator columns that flag which values were originally missing.

For each feature that contains at least one NaN in the training data, a new binary column is appended to the output. The indicator column contains 1 where the original value was missing and 0 otherwise.

This converter is typically stacked onto an imputer (via the imputer's add_indicator=True option, or explicitly in a pipeline) so that the model can distinguish between "value was imputed" and "value was genuinely observed". Preserving missingness patterns can improve downstream model accuracy when data is not missing completely at random (MCAR). Output columns are typed as Integer (int64) in DashAI.

Wraps sklearn.impute.MissingIndicator.

References

Methods

fit(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> 'MissingIndicator'

Defined on MissingIndicator

Fit after normalising missing values so sklearn detects them.

get_output_type(self, column_name: str = None) -> DashAI.back.types.dashai_data_type.DashAIDataType

Defined on MissingIndicator

Return the DashAI data type produced by this converter for a column.

Parameters

column_name : str, optional
Not used; all output columns share the same type. Defaults to None.

Returns

DashAIDataType
An Integer type backed by pyarrow.int64(), representing binary 0/1 missingness flags.

transform(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> 'DashAIDataset'

Defined on MissingIndicator

Transform x by appending missing-value indicator columns.

get_metadata(cls) -> 'Dict[str, Any]'

Defined on BaseConverter

Get metadata for the converter, used by the DashAI frontend.

Parameters

cls : type
The converter class (injected automatically by Python for classmethods).

Returns

Dict[str, Any]
Dictionary containing display name, short description, image preview path, category, icon, color, and whether the converter is supervised.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.