Skip to content

Kacperencki/wind_or_something

Repository files navigation

Wind Power Forecasting with Tensor Decomposition (CP & Tucker)

This project evaluates how tensor decomposition (CP and Tucker) affects the performance of short-term wind turbine power forecasting. We use real SCADA data and compare multiple forecasting models trained on raw vs. decomposed reconstructions.

Overview

1. Data Preprocessing

  • Load SCADA CSV
  • Parse timestamps
  • Normalize features
  • Build tensor (Days × Window × Features)

2. Tensor Decomposition

  • CP ranks
  • Tucker ranks
  • Reconstruction error analysis

3. Forecasting Models

  • Baseline
  • Ridge
  • MLP
  • CNN
  • LSTM

4. Evaluation

  • CSV summaries
  • Plots for CP/Tucker errors
  • Model performance

Repository Structure

MLGproject/
│
├── preprocess.py
├── windows.py
├── decompose.py
├── models.py
├── run.py
├── analyze_results.py
├── results/
└── data/

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your data:
    • Option A: Set environment variable: set DATA_CSV=C:\path\to\your\scada.xlsx
    • Option B: Create data/ folder and place scada.xlsx there
    • Option C: Edit DATA_CSV path in config.py

Running

  1. Test setup (recommended first):
python smoke_test.py
  1. Run full pipeline:
python run.py          # Main training pipeline
python viz.py           # Generate visualizations
python analyze.py       # Additional analysis plots

Data Requirements

  • Format: Excel (.xlsx) or CSV file
  • Columns: Must include Timestamps, Power, and 15 SCADA features
  • Frequency: 10-minute intervals recommended
  • Duration: At least 30 days for meaningful results

Troubleshooting

  • Import errors: Run pip install -r requirements.txt
  • Data not found: Check DATA_CSV configuration in config.py
  • CUDA errors: Decomposition will automatically fall back to CPU
  • Memory issues: Reduce MAX_DAYS in config.py or use smaller Tucker ranks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages