import os, warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
warnings.filterwarnings(“ignore”)
pd.set_option(“display.width”, 160)
pd.set_option(“display.max_columns”, 30)
print(“numpy:”, np.__version__)
import scipy; print(“scipy:”, scipy.__version__)
try:
import torch
HAS_GPU = torch.cuda.is_available()
except Exception:
HAS_GPU = False
print(f”GPU available: {HAS_GPU}”)
df = pd.read_csv(
“https://timecopilot.s3.amazonaws.com/public/data/air_passengers.csv”,
parse_dates=[“ds”],
)
df[“unique_id”] = df[“unique_id”].astype(str)
rng = np.random.default_rng(7)
dates = df[“ds”].unique(); n = len(dates)
synth = pd.DataFrame({
“unique_id”: “Synthetic”,
“ds”: dates,
“y”: (np.linspace(50, 250, n)
+ 40 * np.sin(2 * np.pi * np.arange(n) / 12)
+ rng.normal(0, 8, n)).round(2),
})
anomaly_idx = [30, 75, 120]
synth.loc[anomaly_idx, “y”] *= 2.2
panel = pd.concat([df[[“unique_id”, “ds”, “y”]], synth], ignore_index=True)
print(“\nPanel shape:”, panel.shape)
print(panel.groupby(“unique_id”)[“y”].agg([“count”, “mean”, “min”, “max”]))
H, FREQ = 12, “MS”
Trending
- How to Build a Forecasting Pipeline with TimeCopilot Using Foundation Models and Automated Anomaly Detection
- Yandex Open-Sources YaFF: A Zero-Copy Wire Format for Protobuf With Near-Struct Read Speed
- GPU-Resident Top-K for Agentic RAG: I Built a CUDA Kernel So My Retrieval Step Would Stop Bouncing Off the GPU
- Minimum age of 11 set for UK puberty blocker trial
- VibeThinker-3B: A 3B Dense Reasoning Model Built on Qwen2.5-Coder-3B With the Spectrum-to-Signal Post-Training Pipeline
- I Tried to Schedule My ETL Pipeline. Here’s What I Didn’t Expect.
- Five tips to keep your kids cool this weekend
- NVIDIA AI Introduce SpatialClaw: A Training-Free Agent That Treats Code as the Action Interface for Spatial Reasoning
