Capabilities

Inputs & features

Real series rarely live alone. APDTFlow takes multiple sensors, external drivers, categorical signals, and multi-regime equipment data — and tells you what it leaned on.

← All features

Rich inputs

Feed more than a single series — sensors, drivers, categories, operating regimes.

Multivariate sensor fusion

Fuse many channels into one health indicator and read which mattered.

Pass several columns via feature_cols and the model learns to fuse them into one health indicator for your target. sensor_importance_ then reports how much each channel contributed, so the prediction stays explainable.

model.fit(..., feature_cols=sensors); model.sensor_importance_
python
model.fit(df, target_col='soh', feature_cols=['voltage', 'current', 'temp'])
model.sensor_importance_      # learned weight per input channel

Exogenous variables

Bring known drivers (promotions, weather) with concat / gated / attention fusion.

Add outside drivers that move the series — promotions, weather, price. Choose how they combine with the signal (concat, gated, or attention), and pass future_exog_cols for drivers whose future values you will know at forecast time.

fit(..., exog_cols=[...], future_exog_cols=[...])
python
model = APDTFlowForecaster(exog_fusion_type='gated')
model.fit(df, target_col='sales', exog_cols=['promo'], future_exog_cols=['promo'])

yhat = model.predict(exog_future=future_promo)
see example: backtesting_demo.py (Example 5) →

Categorical features

Day-of-week, holidays and other categories via one-hot or learned embeddings.

Turn discrete inputs like day-of-week or a holiday flag into model features, as plain one-hot vectors or trainable embeddings, so calendar and category effects get captured.

fit(..., categorical_cols=['day_of_week'])
python
model = APDTFlowForecaster(categorical_encoding='embedding')
model.fit(df, target_col='y', categorical_cols=['day_of_week', 'holiday'])

Regime normalization

Normalize multi-condition equipment per operating regime before fitting.

Industrial assets often switch between operating regimes that shift every sensor's baseline. regime_normalize() standardizes each regime on its own so those shifts do not look like signal; keep the returned stats and reuse them at inference.

regime_normalize(df, op_cols, sensor_cols)
python
from apdtflow.preprocessing import regime_normalize

df_norm, stats = regime_normalize(df, op_cols=['regime'], sensor_cols=sensors)
← Previous Forecasting & uncertainty Next → Evaluation & monitoring