← Về thư mục
skills/timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py
- detect_context_anomalies · function · L50-L90 — def detect_context_anomalies( values: np.ndarray, dates: list, ) -> tuple[list[dict], np.ndarray, np.ndarray, float]
- build_synthetic_future · function · L98-L118 — def build_synthetic_future( context: np.ndarray, n: int, seed: int = 42, ) -> tuple[np.ndarray, list[int]]
- detect_forecast_anomalies · function · L121-L164 — def detect_forecast_anomalies( future_values: np.ndarray, point: np.ndarray, quant_fc: np.ndarray, future_dates: list, injected_at: list[int], ) -> list[dict]
- plot_results · function · L172-L383 — def plot_results( context_dates: list, context_values: np.ndarray, ctx_records: list[dict], trend_line: np.ndarray, residuals: np.ndarray, res_std: float, future_dates: list, future_values: np.ndarray, point_fc: np.ndarray, quant_fc: np.ndarray, fc_records: list[dict], ) -> None
- main · function · L391-L520 — def main() -> None