Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

electricity-forecasting-framework电力预测框架

Agent Skill

electricity-forecasting-framework 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,423

周安装

103

GitHub Stars

公开资料未说明

下载量

849
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:electricity-forecasting-framework(电力预测框架)
来源仓库:https://github.com/sxy799/electricity-forecasting-framework
安装命令:
openclaw skills install electricity-forecasting-framework
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install electricity-forecasting-framework

简介

electricity-forecasting-framework 整合统计方法与机器学习模型进行电力负荷预测。

  • 支持 ARIMA、SARIMA、XGBoost 等多种算法组合应用。
  • 可用于需求侧管理与电网调度优化等能源相关领域。
  • 需准备历史负荷数据并进行特征工程预处理。
  • 模型性能依赖数据质量与参数调优,建议交叉验证后使用。

SKILL.md

name
electricity-forecasting
description
Comprehensive electricity load and demand forecasting framework. Supports statistical methods (ARIMA, SARIMA), machine learning (XGBoost, LightGBM, Random Forest), and deep learning (LSTM, GRU, Transformer, TFT). Use when building short-term load forecasting (STLF) systems, predicting electricity demand for energy trading, analyzing consumption patterns, integrating weather features, evaluating forecasts with MAPE/RMSE/MAE, or deploying production pipelines with uncertainty quantification.

Electricity Forecasting Framework

Overview

This skill provides end-to-end support for electricity load/demand forecasting projects, from data preprocessing to model deployment. It covers traditional statistical methods, modern machine learning approaches, and state-of-the-art deep learning architectures.

Quick Start

1. Define Your Forecasting Task

HorizonTypeTypical Use
1-48 hoursShort-term (STLF)Grid operations, unit commitment
1 week - 1 monthMedium-termMaintenance scheduling, fuel planning
1-12 monthsLong-term (LTLF)Capacity planning, infrastructure investment

2. Prepare Your Data

# Run the data preparation script
python scripts/prepare_data.py --input raw_load.csv --output processed/

Required data columns:

  • timestamp: Datetime index (hourly or sub-hourly)
  • load: Target variable (MW or kWh)
  • temperature: Weather feature (°C)
  • Optional: humidity, wind_speed, solar_radiation, holiday_flag

3. Select Your Model

See references/model-selection.md for detailed guidance.

Quick recommendation:

  • Baseline: Start with persistence or seasonal-naive
  • Production STLF: Use XGBoost or LightGBM with weather features
  • Research/SOTA: Try Temporal Fusion Transformer (TFT) or iTransformer

4. Train and Evaluate

python scripts/train_model.py --model xgboost --data processed/ --horizon 24

Key metrics to track:

  • MAPE (%): Mean Absolute Percentage Error - business interpretability
  • RMSE (MW): Root Mean Square Error - penalizes large errors
  • MAE (MW): Mean Absolute Error - robust to outliers
  • Coverage (%): Prediction interval coverage probability

Core Workflows

Data Preprocessing

  1. Load raw data with proper datetime parsing
  2. Handle missing values: Forward-fill for short gaps, interpolate for longer
  3. Feature engineering:

- Temporal: hour, day_of_week, month, is_weekend, is_holiday - Lag features: load_t-1, load_t-24, load_t-168 (weekly) - Rolling stats: rolling_mean_24h, rolling_std_7d - Weather: temperature, humidity, apparent_temperature

  1. Normalization: RobustScaler or MinMaxScaler for deep learning models

See references/feature-engineering.md for complete feature list.

Model Training

# Example training workflow
from electricity_forecasting import ForecastPipeline

pipeline = ForecastPipeline(
    model_type="xgboost",
    horizon=24,
    lookback=168  # 1 week of history
)

pipeline.fit(train_data, val_data)
predictions, uncertainty = pipeline.predict(test_data)
metrics = pipeline.evaluate(predictions, actuals)

Hyperparameter Tuning

Use scripts/hyperparameter_search.py for automated tuning:

python scripts/hyperparameter_search.py \
  --model lightgbm \
  --data processed/ \
  --n-trials 50 \
  --study-name stlf-tuning

Uncertainty Quantification

For risk-aware decision making:

  • Quantile Regression: Predict multiple quantiles (0.1, 0.5, 0.9)
  • Conformal Prediction: Distribution-free uncertainty bounds
  • Ensemble Methods: Model disagreement as uncertainty proxy
  • Monte Carlo Dropout: For neural networks

See references/uncertainty.md for implementation details.

Model Reference

Statistical Models

ModelBest ForProsCons
ARIMAStable seriesInterpretable, fastAssumes linearity
SARIMAStrong seasonalityCaptures daily/weekly patternsManual parameter tuning
ProphetMultiple seasonalitiesHandles holidays wellLess accurate for STLF
TBATSComplex seasonalityAutomatic parameter selectionSlower training

Machine Learning Models

ModelBest ForProsCons
XGBoostProduction STLFFast, accurate, handles missingNo native uncertainty
LightGBMLarge datasetsFaster than XGBoost, memory efficientSensitive to hyperparameters
Random ForestBaseline MLRobust, easy to tuneLower accuracy than boosting
CatBoostCategorical featuresHandles categoricals nativelySlower training

Deep Learning Models

ModelBest ForProsCons
LSTMSequential patternsCaptures long-term dependenciesSlow training, hard to tune
GRUSimilar to LSTMFaster convergenceSimilar limitations
TransformerLong sequencesParallel training, attentionData-hungry, complex
TFTMulti-horizonInterpretable attention, uncertaintyComplex implementation
N-BEATSPure deep learningStrong baseline, interpretableLess flexible than TFT
iTransformerSOTA performanceInverted transformer architectureRecent, less battle-tested

See references/deep-learning-models.md for architecture details and PyTorch implementations.

Evaluation Best Practices

Time Series Cross-Validation

Never use random k-fold! Use expanding or sliding window:

# Expanding window CV
from sklearn.model_selection import TimeSeriesSplit

tscv = TimeSeriesSplit(n_splits=5, test_size=168)  # 1 week test
for train_idx, test_idx in tscv.split(data):
    train, test = data[train_idx], data[test_idx]
    # Train and evaluate

Backtesting Framework

python scripts/backtest.py \
  --model xgboost \
  --data processed/ \
  --cv-splits 5 \
  --horizon 24 \
  --metrics mape,rmse,mae

Benchmark Comparison

Always compare against:

  1. Persistence: load_t = load_t-1
  2. Seasonal Naive: load_t = load_t-24 (for hourly data)
  3. Weekly Naive: load_t = load_t-168

Deployment

Production Pipeline

  1. Model serialization: Save with joblib or ONNX
  2. Feature pipeline: Ensure identical preprocessing at inference
  3. Scheduling: Cron or Airflow for automated forecasts
  4. Monitoring: Track forecast drift and retrain triggers

See references/deployment.md for MLOps patterns.

Real-time Inference

from electricity_forecasting import DeploymentModel

model = DeploymentModel.load("models/xgboost-stlf.joblib")
features = prepare_features(latest_data)
prediction = model.predict(features, return_uncertainty=True)

Common Pitfalls

  1. Data leakage: Ensure no future information in features
  2. Holiday handling: Special days need explicit modeling
  3. Temperature nonlinearity: Use heating/cooling degree days
  4. Concept drift: Retrain quarterly or when MAPE degrades >20%
  5. Peak prediction: Models often under-predict peaks - consider quantile loss

Resources

Scripts

ScriptPurpose
scripts/prepare_data.pyData cleaning and feature engineering
scripts/train_model.pyModel training with validation
scripts/hyperparameter_search.pyAutomated hyperparameter optimization
scripts/backtest.pyTime series cross-validation
scripts/evaluate.pyComprehensive metric calculation
scripts/deploy_model.pyExport model for production

Example Usage

# Complete workflow example
# 1. Prepare data
python scripts/prepare_data.py --input data/load_2024.csv --output data/processed/

# 2. Train model
python scripts/train_model.py --model lightgbm --data data/processed/ --horizon 48

# 3. Hyperparameter tuning
python scripts/hyperparameter_search.py --model lightgbm --data data/processed/ --n-trials 100

# 4. Backtest
python scripts/backtest.py --model lightgbm-best --data data/processed/ --cv-splits 5

# 5. Deploy
python scripts/deploy_model.py --model lightgbm-best --output models/production/

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

79.11%
按下载量换算672

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills