Skip to content

Data & Features

Transformers, feature engineering, stationarity, and pipeline composition. These notebooks show how to clean and resample time series, build lag and rolling features, apply differencing and decomposition, and wire transformers together with FeaturePipeline.

  • How to Handle Missing Data


    Compare SimpleTimeImputer, SeasonalImputer, SimpleImputer, and TransformedSpaceKNNImputer on synthetic block and scattered gaps in monthly tourism data.

    View · Open in marimo

  • How to Use ColumnTransformer


    Route columns through distinct transformers with ColumnTransformer, including remainder handling and automatic panel-aware column detection.

    View · Open in marimo

  • How to Clean Time Series Data


    End-to-end data cleaning pipeline combining SimpleTimeImputer and SeasonalImputer for missing values with OutlierThresholdHandler for anomaly clipping.

    View · Open in marimo

  • Decomposition


    Chain PolynomialTrendForecaster, PatternSeasonalityForecaster, and FourierSeasonalityForecaster inside DecompositionPipeline with component visualisation.

    View · Open in marimo

  • How to Compose Features with FeatureUnion


    Combine lag features, rolling statistics, EMA, and scaling in parallel with FeatureUnion and automatic observation horizon resolution.

    View · Open in marimo

  • How to Tune Fourier Seasonality Terms


    Explore how Fourier harmonic count affects seasonal fit quality, compare Fourier vs Pattern seasonality, and tune harmonics jointly with GridSearchCV.

    View · Open in marimo

  • How to Wrap Functions as Transformers


    Wrap arbitrary polars or numpy operations as sklearn transformers with FunctionTransformer, supporting stateful warmup, inverse transforms, and pipelines.

    View · Open in marimo

  • How to Handle Long Series


    Limit history with observation_horizon, weight recent errors with exponential decay, and downsample high-frequency data.

    View · Open in marimo

  • How to Handle Outliers in a Forecasting Pipeline


    Detect and clip outliers with OutlierThresholdHandler and OutlierPercentileHandler, then see how outliers affect conformal prediction intervals.

    View · Open in marimo

  • How to Handle Short Series


    Use Fourier seasonality, simple train/test splits, and panel pooling when individual series are too short for standard approaches.

    View · Open in marimo

  • How to Build a Feature Pipeline


    Nest FeaturePipeline, FeatureUnion, and DecompositionPipeline for multi-level feature engineering with trend-season-residual decomposition.

    View · Open in marimo

  • How to Resample Time Series


    Demonstrate Downsampler and Upsampler for changing time series frequency, including multivariate support, boundary settings, and round-trip information loss.

    View · Open in marimo

  • How to Apply Signal Processing Filters


    Apply NumericalFilter (Butterworth, Chebyshev, Bessel), NumericalDifferentiator, and NumericalIntegrator for signal smoothing and rate-of-change extraction.

    View · Open in marimo

  • How to Use Scikit-learn Scalers


    Wrap sklearn scalers (StandardScaler, MinMaxScaler, RobustScaler, PowerTransformer, PolynomialFeatures) for polars DataFrames with inverse transforms.

    View · Open in marimo

  • How to Apply Stationarity Transforms


    Catalogue of variance-stabilising and detrending transforms: LogTransformer, BoxCox, SeasonalDifferencing, SeasonalReturn, and ASinh with inverse verification.

    View · Open in marimo

  • How to Align Exogenous Features Across Pipeline Steps


    Control which step-indexed columns each direct-strategy estimator sees using the step_feature_alignment parameter of PointReductionForecaster.

    View · Open in marimo

  • How to Add Calendar, Fourier, and Holiday Features


    Enrich your feature matrix with time-derived signals using CalendarFeatureTransformer, FourierFeatureTransformer, and HolidayFeatureTransformer.

    View · Open in marimo

  • How to Apply Window Transformations


    Feature engineering with LagTransformer, RollingStatisticsTransformer, SlidingWindowFunctionTransformer, and ExponentialMovingAverage on time series data.

    View · Open in marimo