jpskill.com
💼 ビジネス コミュニティ

timesfm

GoogleのTimesFMというモデルを使って、売上予測やサーバーの状況把握、金融分析、異常検知など、特別な学習なしで様々な時系列データを予測分析するSkill。

📜 元の英語説明(参考)

Forecast time series data using Google's TimesFM foundation model with zero-shot prediction. Use when: forecasting sales or demand, predicting server metrics, financial time series analysis, anomaly detection without training custom models.

🇯🇵 日本人クリエイター向け解説

一言でいうと

GoogleのTimesFMというモデルを使って、売上予測やサーバーの状況把握、金融分析、異常検知など、特別な学習なしで様々な時系列データを予測分析するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o timesfm.zip https://jpskill.com/download/15481.zip && unzip -o timesfm.zip && rm timesfm.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15481.zip -OutFile "$d\timesfm.zip"; Expand-Archive "$d\timesfm.zip" -DestinationPath $d -Force; ri "$d\timesfm.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して timesfm.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → timesfm フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

TimesFM

概要

TimesFM は、Google Research が開発した 200M パラメータの基盤モデルで、1000 億の実世界のタイムポイントで事前学習されています。ドメインを越えたゼロショット予測を実行でき、ファインチューニングは不要です。過去のデータを入力すると、すぐに予測が得られます。

手順

インストール

pip install timesfm

基本的な予測

import timesfm
import numpy as np

# モデルの初期化
tfm = timesfm.TimesFm(
    hparams=timesfm.TimesFmHparams(
        per_core_batch_size=32,
        horizon_len=30,
    ),
    checkpoint=timesfm.TimesFmCheckpoint(
        huggingface_repo_id="google/timesfm-2.0-200m-pytorch",
    ),
)

# 過去のデータ(例:1年間の毎日の売上)
history = np.array([120, 135, 128, 142, 155, 148, 160, ...])

# 次の30日を予測
forecasts = tfm.forecast([history], freq=[1])
predictions = forecasts[0]  # shape: (30,)

頻度パラメータ

freq をデータの粒度に合わせて設定します。

  • 0: 高頻度(秒/分)
  • 1: 毎日
  • 2: 毎週/毎月

複数系列の予測

# 複数の製品カテゴリを一度に予測
series = [sales_electronics, sales_clothing, sales_food]
forecasts = tfm.forecast(series, freq=[1, 1, 1])
# 3つの予測配列のリストを返します

例 1: 需要予測

入力: 365 日間の毎日の製品売上データ。 出力: モデルが週ごとの季節性と成長トレンドを自動的に捉えた 30 日間の予測。

history = load_csv("daily_sales.csv")["quantity"].values
forecast = tfm.forecast([history], freq=[1])[0]
print(f"Next 7 days: {forecast[:7]}")
# Next 7 days: [182, 175, 190, 168, 195, 201, 178]

例 2: サーバーメトリクスの異常検知

入力: 720 時間 (30 日間) の CPU 使用率。 出力: 今後 24 時間の予測。実績値が予測値を 2 倍の標準偏差を超えた場合にフラグを立てます。

cpu_history = get_metrics("cpu_percent", days=30)
forecast = tfm.forecast([cpu_history], freq=[0])[0]
threshold = forecast.mean() + 2 * forecast.std()

ガイドライン

  • 少なくとも予測期間の 3 倍の期間の履歴データを提供してください (30 日間の予測の場合、90 日以上の履歴データが必要です)。
  • TimesFM は、明確なパターン (季節性、トレンド) を持つデータで最も効果を発揮します。
  • ノイズの多いデータの場合は、モデルに入力する前にローリング平均で平滑化してください。
  • ナイーブなベースライン (最後の期間の値) と比較して、改善を検証してください。
  • モデルは CPU で実行されます。GPU は多数の系列のバッチ処理を高速化します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

TimesFM

Overview

TimesFM is a 200M-parameter foundation model by Google Research, pretrained on 100 billion real-world time points. It performs zero-shot forecasting across domains — no fine-tuning required. Feed it historical data, get predictions immediately.

Instructions

Installation

pip install timesfm

Basic Forecasting

import timesfm
import numpy as np

# Initialize model
tfm = timesfm.TimesFm(
    hparams=timesfm.TimesFmHparams(
        per_core_batch_size=32,
        horizon_len=30,
    ),
    checkpoint=timesfm.TimesFmCheckpoint(
        huggingface_repo_id="google/timesfm-2.0-200m-pytorch",
    ),
)

# Your historical data (e.g., daily sales for 1 year)
history = np.array([120, 135, 128, 142, 155, 148, 160, ...])

# Forecast next 30 days
forecasts = tfm.forecast([history], freq=[1])
predictions = forecasts[0]  # shape: (30,)

Frequency Parameter

Set freq to match your data granularity:

  • 0: High frequency (seconds/minutes)
  • 1: Daily
  • 2: Weekly/Monthly

Multi-Series Forecasting

# Forecast multiple product categories at once
series = [sales_electronics, sales_clothing, sales_food]
forecasts = tfm.forecast(series, freq=[1, 1, 1])
# Returns list of 3 forecast arrays

Examples

Example 1: Demand forecasting

Input: 365 days of daily product sales data. Output: 30-day forecast with the model capturing weekly seasonality and growth trend automatically.

history = load_csv("daily_sales.csv")["quantity"].values
forecast = tfm.forecast([history], freq=[1])[0]
print(f"Next 7 days: {forecast[:7]}")
# Next 7 days: [182, 175, 190, 168, 195, 201, 178]

Example 2: Server metrics anomaly detection

Input: 720 hours (30 days) of CPU utilization. Output: Forecast next 24 hours. Flag if actual exceeds forecast by 2x standard deviation.

cpu_history = get_metrics("cpu_percent", days=30)
forecast = tfm.forecast([cpu_history], freq=[0])[0]
threshold = forecast.mean() + 2 * forecast.std()

Guidelines

  • Provide at least 3x the forecast horizon as history (forecasting 30 days? give 90+ days history)
  • TimesFM works best on data with clear patterns (seasonality, trends)
  • For noisy data, smooth with rolling average before feeding to the model
  • Compare against a naive baseline (last period's values) to validate improvement
  • The model runs on CPU; GPU speeds up batch processing of many series