Skip to content

innovate.predict_frames

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def predict_frames(
datasets: Iterable[tuple[FitResult | Exception, pl.DataFrame | pl.LazyFrame]],
*,
quantity: str = 'level',
covariate_rate_columns: dict[str, str] | None = None,
) -> list[pl.DataFrame | Exception]: ...

Predict each paired frame sequentially, preserving failed fits as values.

  • datasets: Iterable of pairs (fitted, frame). The first element is a FitResult or an existing Exception; the second is a Polars frame satisfying that fit’s prediction contract.
  • quantity: Shared "level" or "rate" output choice; defaults to level.
  • covariate_rate_columns: Shared optional Logistic control-to-derivative-column mapping for rate predictions.

Ordered list of prediction tables or exceptions. Existing fit exceptions are passed through unchanged. ValueError, TypeError and PolarsError from prediction are retained at the corresponding position.

  • Exception: Errors outside the retained categories, malformed pair unpacking, and errors while advancing the iterable propagate.