timesfm-ts - v1.0.0
    Preparing search index...

    Function reconcileForecast

    • Forecast every node independently with TimesFM, then reconcile the stacked base forecasts across the hierarchy.

      Steps:

      1. Validate the hierarchy structure.
      2. Build the summing matrix S.
      3. Call TimesFMModel.forecast once for all nodes (batched).
      4. Reconcile via the chosen strategy (MinT by default).
      5. Reconstruct per-node quantile forecasts from the reconciled point forecast (proportional adjustment from base quantiles).

      Parameters

      • model: TimesFMModel

        A compiled TimesFMModel instance.

      • params: HierarchicalForecastParams

        Forecast parameters including hierarchy definition, per-node input series, and horizon.

      Returns Promise<HierarchicalForecastOutput>

      A HierarchicalForecastOutput with per-node reconciled forecasts and the top-level (unreconciled) raw model output for backward compatibility.

      if the hierarchy is invalid or any node is missing from the inputs map.