Reference / Limen research

limen.transforms

Hold stateless transform helpers for target construction and data cleanup.

Contents

Canonical docs

In the research projects

The Python project shifts observations while constructing its next-bar label. The Compiled project declares a shifted fitted target. The transform reference explains why a stateless operation does not own the train-fitted state used on later splits.

What this package owns

Owns stateless DataFrame transforms. Does not own fitted feature scaling, higher-level feature engineering, experiment orchestration, or post-model helpers such as probability calibration and threshold optimization (see limen.calibration).

Key entry points

Entry point Use case Notes
shift_column_transform Forward-looking target column Available inside caller-owned preparation
zscore_transform Frame-wide normalization step Stateless per call
winsorize_transform, mad_transform, quantile_trim_transform Clipping or row filtering before modeling These do not carry their own train-only state

Adjacent modules

  • limen.features and limen.indicators produce the columns these transforms often operate on.
  • limen.scalers handles fitted train-only scaling, which is a separate concern from this package.
  • limen.calibration handles probability calibration and threshold optimization after model training.
  • limen.experiment.Manifest provides the most common place to attach target transforms.

Quick orientation

Module or family Responsibility
shift_column_transform.py Forward-looking target shifts
zscore_transform.py Stateless DataFrame normalization
winsorize_transform.py Percentile clipping
mad_transform.py Median absolute deviation scaling
quantile_trim_transform.py Quantile-based row trimming
text · README.md
transforms/├── README.md├── __init__.py├── mad_transform.py├── quantile_trim_transform.py├── shift_column_transform.py├── winsorize_transform.py└── zscore_transform.py

Things to know

  • All helpers in this package are intentionally stateless per call.
  • For fit-on-train and apply-to-all semantics, use a manifest fit parameter or a scaler rather than assuming a transform will remember state.
  • shift_column_transform with shift=-1 creates a future-looking label and therefore introduces a trailing null row that later prep stages drop.

Limen / Python Research and Compiled ResearchReturn to the research book
Edit this sourceSource revision · 9bc8a630
Reference / keep your place
Find a passage