Feature Configuration¶
This section documents configuration objects used to control panel feature engineering behavior in eb-features.
Configuration objects define which features are built, how leakage is handled, and how missing history is treated.
All content below is generated automatically from NumPy-style docstrings in the source code.
Configuration API¶
eb_features.panel.config
¶
Configuration objects for panel time-series feature engineering.
This module defines declarative configuration used by the panel feature engineering pipeline. The configuration is designed to be:
- frequency-agnostic (lags/windows are expressed in index steps, not wall-clock time)
- stateless (config describes what to compute; no fitted state is stored)
- explicit (feature families are enabled/disabled via lists/flags)
Notes
This configuration is consumed by
FeatureEngineer and related helper
modules (lags, rolling, calendar, encoders).
FeatureConfig
dataclass
¶
Configuration for panel time-series feature engineering.
The feature engineering pipeline assumes a long-form panel DataFrame with an entity identifier column, a timestamp column, and a numeric target column. This configuration describes which feature families to generate and which passthrough columns to include.
Notes
- Lag steps and rolling windows are expressed in index steps (rows) at the input frequency, not in wall-clock units.
- Lags and rolling windows are computed within each entity.
- If
dropna=True, rows lacking sufficient lag/rolling history are dropped after feature construction.
Attributes:
| Name | Type | Description |
|---|---|---|
lag_steps |
Sequence[int] | None
|
Positive lag offsets (in steps) applied to the target. For each |
rolling_windows |
Sequence[int] | None
|
Positive rolling window lengths (in steps) applied to the target. For each |
rolling_stats |
Sequence[str]
|
Rolling statistics to compute. Allowed values are:
|
calendar_features |
Sequence[str]
|
Calendar features derived from the timestamp column. Allowed values are:
|
use_cyclical_time |
bool
|
If True, add sine/cosine encodings for hour and day-of-week when those base calendar columns are present. |
regressor_cols |
Sequence[str] | None
|
Numeric external regressors to pass through. If None, numeric columns may be
auto-detected by the calling pipeline (excluding entity/timestamp/target and
|
static_cols |
Sequence[str] | None
|
Entity-level metadata columns already present on the input DataFrame. These are passed through directly as features. |
dropna |
bool
|
If True, drop rows with NaNs in any engineered feature columns (typically caused by lags and rolling windows). |