← Về thư mục
skills/relsa-severity-assessment/scripts/forecast_relsa.py
- interpolate_series · function · L58-L77 — def interpolate_series( times: Iterable[float], values: Iterable[float], step: float = DEFAULT_STEP, ) -> tuple[np.ndarray, np.ndarray]
- ArimaFit · class · L84-L96 — class ArimaFit
- label · method · L94-L96 — def label(self) -> str
- _select_d · function · L99-L116 — def _select_d(y: np.ndarray, max_d: int) -> int
- _fit_one · function · L119-L146 — def _fit_one( y: np.ndarray, order: tuple[int, int, int], drift: bool ) -> ArimaFit | None
- auto_arima · function · L149-L235 — def auto_arima( y: Iterable[float], max_p: int = 5, max_q: int = 5, max_d: int = 2, d: int | None = None, allow_drift: bool = True, stepwise: bool = True, ) -> ArimaFit
- attempt · function · L181-L187 — def attempt(order: tuple[int, int, int], drift: bool) -> ArimaFit | None
- Forecast · class · L242-L274 — class Forecast
- metrics · method · L258-L261 — def metrics(self) -> ForecastMetrics
- to_frame · method · L263-L274 — def to_frame(self) -> pd.DataFrame
- forecast_animal · function · L277-L372 — def forecast_animal( times: Iterable[float], values: Iterable[float], target_times: Iterable[float] | None = None, animal: str = "", interpolate_step: float | None = DEFAULT_STEP, alpha: float = 0.05, clip_at_zero: bool = True, **arima_kwargs, ) -> Forecast
- predict_endpoint · function · L378-L420 — def predict_endpoint( scores: pd.DataFrame, endpoints: dict[str, float] | None = None, score_col: str = "relsa", **kwargs, ) -> list[Forecast]
- forecast_indirect · function · L423-L470 — def forecast_indirect( prepared: pd.DataFrame, reference, target_time: float, animal: str = "", score_col: str = "relsa", **kwargs, ) -> dict[str, object]
- rolling_forecast · function · L473-L511 — def rolling_forecast( times: Iterable[float], values: Iterable[float], min_train: int = 3, animal: str = "", **kwargs, ) -> pd.DataFrame
- summarize · function · L514-L563 — def summarize(forecasts: Sequence[Forecast], group: dict[str, str] | None = None) -> pd.DataFrame
- plot_forecast · function · L566-L610 — def plot_forecast( forecast: Forecast, path: str | Path, endpoint_threshold: float | None = None, zones: Sequence[float] = (), title: str | None = None, ) -> Path
- build_parser · function · L616-L651 — def build_parser() -> argparse.ArgumentParser
- main · function · L654-L753 — def main(argv: Sequence[str] | None = None) -> int