API Reference

This page documents the public API of pretab: the high-level pretab.preprocessor.Preprocessor and every transformer exported from pretab.transformers.

Preprocessor

pretab.preprocessor.Preprocessor

Preprocessor class for automated tabular feature preprocessing using scikit-learn-compatible pipelines.

Encoders and binning

PLETransformer

Piecewise Linear Encoding (PLE) transformer for numerical features.

CustomBinTransformer

Custom binning transformer for one-dimensional numerical features.

OneHotFromOrdinalTransformer

Convert ordinal-encoded features into a one-hot encoded representation.

LanguageEmbeddingTransformer

Encode categorical text features into embeddings using a pre-trained language model.

Feature maps

RBFExpansionTransformer

Radial Basis Function (RBF) feature expansion for numerical tabular data.

ReLUExpansionTransformer

Applies ReLU basis expansion to input features using fixed or data-driven center placement.

SigmoidExpansionTransformer

Applies sigmoid basis expansion to input features using specified or data-driven center placement.

TanhExpansionTransformer

Applies hyperbolic tangent (tanh) basis expansion to input features using specified or learned center locations.

Splines

CubicSplineTransformer

Cubic Spline Transformer for one-dimensional or multi-dimensional input features.

NaturalCubicSplineTransformer

Natural Cubic Spline Transformer for continuous features.

PSplineTransformer

P-spline Transformer for smooth spline basis expansion with penalization.

TensorProductSplineTransformer

Tensor Product Spline Transformer for multivariate smooth basis expansion.

ThinPlateSplineTransformer

Thin Plate Spline Transformer for smooth univariate basis expansion.

Temporal

CyclicalTimeTransformer

Encode a cyclical time variable using sine and cosine components.

LagFeatureTransformer

Create lagged features for time-series inputs.

RollingStatsTransformer

Compute rolling-window statistics over time-series inputs.