和顺 / 知几 返回所属 Agent
ZJ-10.01

预测回放

原能力

保留当时的预测、前提和复核日期,到期与实际结果比较后更新判断。(细化版 p.4–5)

首选项目

StatsForecast(Apache-2.0)。 StatsForecast

匹配范围

时间序列交叉验证与版本管理可重算已封存输入。

源码

StatsForecast · def cross_validation(

python/statsforecast/core.py · 1896–1909 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def cross_validation(
        self,
        h: int,
        df: Any,
        n_windows: int = 1,
        step_size: int = 1,
        test_size: Optional[int] = None,
        input_size: Optional[int] = None,
        level: Optional[List[int]] = None,
        fitted: bool = False,
        refit: Union[bool, int] = True,
        prediction_intervals: Optional[ConformalIntervals] = None,
        id_col: str = "unique_id",
        time_col: str = "ds",

DVC · def checkout(

dvc/repo/checkout.py · 110–123 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def checkout(  # noqa: C901
    self,
    targets=None,
    with_deps=False,
    force=False,
    relink=False,
    recursive=False,
    allow_missing=False,
    **kwargs,
):
    from dvc.repo.index import build_data_index
    from dvc.stage.exceptions import StageFileBadNameError, StageFileDoesNotExistError
    from dvc_data.index.checkout import ADD, DELETE, MODIFY, apply, compare

实现与验收要点

恢复原预测、特定时间可得信息和后续结果对齐。