60-second start

Quickstart

One install, one trained model, three kinds of questions. Continuous-time forecasting with calibrated uncertainty on both value and time.

$ pip install apdtflow

The whole API at a glance

Two flags unlock the timing capabilities: decoder_type='continuous' swaps in the Neural-ODE decoder you can query at any real-valued time, and use_conformal=True calibrates the uncertainty windows.

python
from apdtflow import APDTFlowForecaster

model = APDTFlowForecaster(forecast_horizon=40, decoder_type='continuous',
                           use_conformal=True)
model.fit(df, target_col='capacity', feature_cols=sensor_cols)

model.predict()                                       # classic grid forecast
model.predict_at(['2026-06-14 14:37', 3.6])           # value at ANY moment
result = model.predict_when(threshold=1.4,            # WHEN it crosses the line
                            direction='below')
result.eta, result.act_by, result.censored
schedule = model.predict_when_fleet(assets,           # whole fleet -> ranked schedule
                                    threshold=1.4, direction='below')
predict()

Next k values on the grid, with optional conformal intervals.

predict_at(times)

Value at arbitrary timestamps — fractional steps, beyond the horizon.

predict_when(threshold)

A calibrated 90% window on the crossing time, plus an act_by edge.

Prefer a runnable notebook?

The Quickstart notebook covers all three questions end-to-end and opens in Colab with zero setup.