Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☀️ Solar PV Power Forecasting

A comprehensive Machine Learning project to forecast Solar Photovoltaic (PV) power generation featuring a custom From-Scratch Decision Tree algorithm.

Status Python Machine Learning

📖 Overview

Accurate solar PV forecasting is critical for grid stability and efficient energy management. This project applies machine learning techniques to predict PV power output based on weather data and other environmental factors.

A major highlight of this project is a from-scratch implementation of a Decision Tree (Regressor and Classifier), which is then rigorously benchmarked against industry-standard models.

✨ Key Features

  • Custom Decision Tree Implementation: A purely from-scratch Decision Tree supporting MSE splitting (regression) and Gini/Entropy splitting (classification), built without using sklearn.tree.
  • Extensive Benchmarking: Evaluates and compares 9 Regression models and 9 Classification models.
  • Comprehensive Metrics: Assesses model performance across 55+ different evaluation metrics (including MAE, MSE, R², F1, ROC-AUC, etc.).
  • Rich Visualizations: Generates 20 high-resolution plots organized into 6 multi-panel figures, visualizing dataset distributions, weather correlations, residual scatters, ROC curves, and more.
  • Automated Presentation Generation: Python scripts included to programmatically compile results into a structured PowerPoint presentation.

📂 Project Structure

ML_project/
├── data/              # Datasets and generated metrics
│   ├── LBNL_file.csv  # Large dataset (Ignored by Git to fit limits)
│   ├── classification_metrics.csv
│   ├── regression_metrics.csv
│   └── solar_pv_full_results.csv
├── docs/              # Research papers and generated presentations
│   ├── Solar_PV_Forecasting.pptx
│   └── ML project sample PPT.pdf
├── figures/           # High-resolution output plots (.png)
│   ├── fig1_dataset_exploration.png
│   ├── fig2_solar_weather.png
│   └── ...
└── src/               # Python source code
    ├── solar_pv_forecasting_v2.py # Core ML logic and custom Decision Tree
    ├── solar_pv_plots.py          # Visualization suite 
    └── create_solar_pv_ppt.py     # Script to generate PPT reports

🚀 Models Evaluated

Regression: Linear Regression, Ridge, Lasso, Random Forest, Gradient Boosting, Extra Trees, Support Vector Regressor (SVR), K-Nearest Neighbors (KNN), and our Custom Decision Tree Regressor.

Classification: Logistic Regression, Random Forest, Gradient Boosting, AdaBoost, Extra Trees, SVC, KNN, Gaussian Naive Bayes, and our Custom Decision Tree Classifier.

⚙️ Getting Started

  1. Ensure you have Python 3.x installed along with the required libraries: numpy, pandas, scikit-learn, matplotlib, seaborn, python-pptx (for presentation generation).
  2. Place the dataset inside the data/ directory.
  3. Run src/solar_pv_forecasting_v2.py to train models and generate _metrics.csv files.
  4. Run src/solar_pv_plots.py to generate the evaluation figures.
  5. Run src/create_solar_pv_ppt.py to automatically compile the insights into a .pptx file.

About

A comprehensive Machine Learning project forecasting Solar PV power featuring a from-scratch Decision Tree algorithm and benchmarking against 18 standard models.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages