Skip to content

Constants

This section documents shared constants used throughout eb-features to define allowed configuration values and feature semantics.

All content below is generated automatically from NumPy-style docstrings in the source code.

Constants API

eb_features.panel.constants

Shared constants for panel feature engineering.

This module centralizes small, stable configuration values used across the eb_features.panel subpackage. Keeping these definitions in one place prevents validation drift between modules and provides a single reference point for both implementation and documentation.

Notes
  • These constants are intentionally minimal and low-churn.
  • They define allowed values, default configurations, and calendar parameters used consistently across feature builders.

ALLOWED_ROLLING_STATS = frozenset({'mean', 'std', 'min', 'max', 'sum', 'median'}) module-attribute

Allowed rolling-window summary statistics.

Each statistic corresponds to a feature name of the form:

\[ \mathrm{roll\_{w}\_{stat}}(t) \]

where w is the window length (in index steps) and stat is one of the allowed values.

ALLOWED_CALENDAR_FEATURES = frozenset({'hour', 'dow', 'dom', 'month', 'is_weekend'}) module-attribute

Allowed calendar features derived from the timestamp column.

Calendar features are added as integer-valued columns and may optionally be accompanied by cyclical encodings (sine/cosine) for periodic components.

HOUR_PERIOD = 24 module-attribute

Period used for cyclical hour-of-day encodings.

DOW_PERIOD = 7 module-attribute

Period used for cyclical day-of-week encodings.

WEEKEND_DAYS = (5, 6) module-attribute

Day-of-week values corresponding to Saturday and Sunday.