Skip to content

KaiAllAlone/Time-Series-Analysis-on-PV-Generation-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PV Power Forecasting using Ensemble Learning

This project forecasts photovoltaic (PV) power generation using a combination of statistical, deep learning, and transformer-based models. Predictions from multiple models are combined using a simple mean ensemble to improve accuracy.

πŸ“Œ Features

  • Multiple Models Implemented:
    • ARIMA & Seasonal ARIMA (SARIMA)
    • Vector AutoRegression (VAR)
    • Long Short-Term Memory (LSTM) networks
    • Convolutional Neural Networks (CNN) for time series
    • Multi-Layer Perceptron (MLP)
    • Transformer models for sequence forecasting
  • Ensemble Learning β€” combines outputs from multiple models for robust predictions.
  • Data Visualization β€” publication-quality plots using scienceplots.
  • Model Saving β€” trained models saved in .h5 format.

πŸ“‚ Dataset

The project uses PV power generation data from PVGen.csv:

  • Columns: Time-stamped readings of PV generation.
  • Sampling: Subset of the first 190,000 readings is used for training/testing.
  • Preprocessing: Date extraction, train/test splitting, normalization.

πŸ›  Installation

Install dependencies:

pip install pandas numpy matplotlib seaborn scikit-learn tensorflow pmdarima scienceplots statsmodels

If running in Google Colab, upload the dataset and install missing packages:

!pip install scienceplots pmdarima

πŸš€ Usage

  1. Open PV_Forecating_Using_Ensemble_Learning.ipynb.
  2. Run all cells in sequence:
    • Load and preprocess data
    • Train individual models
    • Generate forecasts
    • Evaluate and visualize results
  3. Saved models will appear as .h5 files.

πŸ“Š Evaluation

Models are compared using Mean Squared Error (MSE) on the test set.
Example comparison:

  • Simple Mean Ensemble
  • CNN
  • MLP
  • ARIMA
  • LSTM
  • VAR
  • Transformer

πŸ“ˆ Example Output

  • Line plots: Actual vs. predicted PV generation.
  • Bar charts: MSE scores for each model.
  • Saved Plots: .svg format for high-quality publication-ready figures.

πŸ“œ License

This repository is licensed under the MIT License β€” see the LICENSE file for details.

About

Trained LSTM,ARIMA,VAR,Transformers and futher trained MLP,CNN and SE Ensemble Models for Time Series Prediction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors