sdm.processing#

Processor API#

Processor

Base processor for tensor-aware table transformations.

InvertibleMixin

Extend a Processor by an inverse transformation.

EnsembleProcessor

Base processor for ensemble-aware table transformations.

EnsembleInvertibleMixin

Extend a EnsembleProcessor by an inverse transformation.

Recipe

Processing contract around an external model boundary.

Common Processors#

Identity

Return inputs unchanged.

Callable

Adapt a stateless callable to the Processor interface.

Sequential

Apply processors and callables to a table in sequence.

DropStypes

Remove all columns for specific semantic types.

StypeDispatch

Apply separate processor pipelines to columns grouped by semantic type.

TaskDispatch

Apply separate processors based on the semantic type of the target.

TableDispatch

Apply separate feature processors to task and related tables.

EnsembleProcessorAdapter

Adapt an ordinary processor to ensemble-aware processing.

Choice

Route each table or ensemble member through one selected option.

ToNumerical

Move categorical columns into the numerical block.

ShuffleColumns

Permute numerical feature columns and their names.

SelectColumns

Select a subset of columns for each semantic type.

Numerical Processors#

Cast

Cast numerical columns to a floating-point dtype.

Clip

Clamp numerical values to a fixed interval.

ClipQuantiles

Clamp feature columns to fitted quantile bounds.

ClipSigma

Two-stage z-score outlier clipping with soft logarithmic bounds.

ClipSoft

Soft-clip numerical values toward ±max_absolute_value.

ImputeMean

Replace NaN feature values with fitted per-column means.

PowerTransform

Apply a feature-wise Yeo-Johnson power transform.

QuantileTransform

Map numerical columns through their empirical quantiles.

Standardize

Center and scale each feature column.

RobustScale

Center and scale each feature column with median and quantile range.

FlipSign

Randomly negate numerical columns.

DropConstantColumns

Remove non-informative numerical columns learned during fit.

PCA

Project numerical columns onto their principal components.

RandomProjection

Randomly project numerical columns.

Categorical Processors#

AlignCategories

Align categorical columns to categories observed during fitting.

ShuffleCategories

Independently permute the integer codes of categorical columns.

ImputeMode

Replace missing categorical values with fitted per-column modes.

AddCategoryCounts

Add the log row count of each categorical value.

Text Processors#

TFIDF

Encode text columns as character n-gram TF-IDF vectors.

SentenceTransformer

Transform text columns with a sentence_transformers.SentenceTransformer model.

Datetime Processors#

AddCalendarFields

Add numerical calendar fields derived from datetime columns.

Post-Processors#

AverageEstimators

Reduce the leading ensemble dimension of model outputs.

Softmax

Apply softmax to logits after temperature scaling.

SortQuantiles

Sort quantile predictions in ascending order.