timesfm-forecasting

Generate zero-shot time series forecasts with prediction intervals using Google's TimesFM foundation model.

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill timesfm-forecasting-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: timesfm-forecasting
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/timesfm-forecasting
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill timesfm-forecasting-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires timesfm, torch, numpy, pandas, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve? Forecasting time series traditionally requires training and tuning custom models like ARIMA or ETS for each dataset. This Skill provides zero-shot forecasting with Google's TimesFM foundation model, producing point forecasts and calibrated prediction intervals for any univariate series without training, while a mandatory preflight checker prevents out-of-memory crashes on under-resourced machines. ## Core Features & Use Cases - Zero-Shot Forecasting: Feed any univariate series (sales, sensors, energy, vitals, weather) as CSV, DataFrame, or numpy arrays and receive point forecasts plus 10-quantile prediction intervals. - Preflight System Checker: A script verifies RAM, GPU/VRAM, disk space, and Python version before the ~800 MB model download, and recommends a safe batch size. - Covariates and Anomaly Detection: Supports exogenous variables via forecast_with_covariates() (TimesFM 2.5 + xreg) and anomaly detection using quantile-based prediction intervals. - Use Case: Load a CSV of monthly sales for hundreds of stores, batch-forecast the next 12 months with 80% prediction intervals, and export results to CSV or JSON using the included forecast_csv.py script. ## Quick Start Ask the agent to run the system check script and then forecast the next 24 months of the sales column in your CSV file with prediction intervals.

Frequently Asked Questions about timesfm-forecasting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I forecast a time series without training a model?

Use TimesFM's zero-shot forecasting: load the pretrained checkpoint with from_pretrained(), call compile() with a ForecastConfig, then call forecast(horizon, inputs) with a list of 1-D numpy arrays. It returns point forecasts and 10-quantile prediction intervals with no training required.

How do I forecast time series from a CSV file with TimesFM?

Run the included forecast_csv.py script with your input file, a horizon, and optional date and value column arguments. It runs the system preflight check, loads TimesFM 2.5, forecasts each numeric column, and writes results to CSV or JSON.

What are the system requirements for running TimesFM locally?

TimesFM 2.5 (200M parameters) needs at least 4 GB RAM on CPU or 2 GB VRAM on GPU, about 1 GB of disk space for weights, and Python 3.10 or later. The archived 500M v2.0 model requires 16 GB RAM or 8 GB VRAM.

Does TimesFM support covariates or exogenous variables?

Yes, TimesFM 2.5 supports exogenous variables through forecast_with_covariates() when installed with timesfm[xreg]. It accepts dynamic numerical, dynamic categorical, and static categorical covariates, but dynamic covariates must span both the context and the forecast horizon.

Why does TimesFM forecast fail with 'Model is not compiled'?

This RuntimeError occurs when forecast() is called before compile(). You must call model.compile() with a ForecastConfig after loading the model with from_pretrained() and before running any inference.

When should I not use TimesFM for time series analysis?

Avoid TimesFM when you need interpretable coefficients from classical models like ARIMA (use statsmodels), time series classification or clustering (use aeon), or multivariate vector autoregression. TimesFM is designed for univariate zero-shot forecasting only.