Skip to content

Power output prediction for a combined cycle power plant using an Artificial Neural Network (ANN). Includes data preprocessing, model training, performance evaluation, and result visualization.

License

Notifications You must be signed in to change notification settings

ArianJr/power-output-prediction-ann

Repository files navigation

⚡ Power Output Prediction using Artificial Neural Networks (ANN)

Predicting the electrical power output of a Combined Cycle Power Plant using Deep Learning
Built with TensorFlow • Keras • NumPy • Scikit-Learn • Matplotlib


license python tensorflow last commit


Project Thumbnail


📑 Table of Contents


📘 Project Overview

This project demonstrates a complete machine learning regression pipeline that predicts power plant electrical output (MW) using environmental and operational parameters.
The solution is implemented with a fully connected Artificial Neural Network (ANN), trained on the Combined Cycle Power Plant (CCPP) dataset from the UCI Machine Learning Repository.

The notebook walks through all steps — data preprocessing → model training → evaluation → visualization — in a clear, educational manner.


🎯 Motivation

Accurate prediction of power output helps:

  • Optimize power generation and resource allocation
  • Support grid management and forecasting systems
  • Serve as a case study for regression using neural networks in industrial contexts

🧠 Dataset

Preprocessing includes:

  • Missing value handling
  • Feature scaling / normalization
  • Train-validation-test split

🧩 Model Architecture

Layer Units Activation Description
Input 4 Input features (AT, AP, RH, V)
Dense 128 ReLU Hidden layer 1
Dense 64 ReLU Hidden layer 2
Output 1 Linear Predicted Power Output

Training Details:

  • Optimizer: Adam
  • Loss: Mean Squared Error (MSE)
  • Metrics: R², MAE, RMSE
  • Callbacks: Early Stopping, Learning Rate Scheduler

📊 Results & Evaluation

Metric Train Validation
MSE 0.0032 0.0037
0.94 0.93

Visual Insights:

  • ✅ Training vs Validation Loss Curve

Training vs Validation Loss

  • ✅ Predicted vs Actual Scatter Plot

Actual vs Predicted

  • ✅ Residual Distribution Plot

Residuals Distribution


🚀 Getting Started

🧰 Requirements

Dependency Version
Python 3.8+
TensorFlow 2.x
NumPy ≥1.22
Scikit-learn ≥1.0
Matplotlib ≥3.5

Install everything with:

pip install -r requirements.txt

▶️ Running the Project

Run the notebook interactively:

jupyter notebook power_output_prediction_ann.ipynb

💡 Example Usage

from predictor import PowerPredictor

# Load trained model
model = PowerPredictor.load("models/ann_model.pkl")

# Predict power output for new sample
X_new = [[25.0, 1015.2, 60.3, 40.1]]
y_pred = model.predict(X_new)

print(f"⚡ Predicted Power Output: {y_pred[0]:.2f} MW")

📁 Repository Structure

Path Description
.gitignore Specifies files and folders to exclude from Git tracking
Folds5x2_pp.xlsx Dataset used for training and evaluation
LICENSE MIT License for open-source sharing
README.md Project overview, documentation, and visual insights
requirements.txt Python dependencies for reproducibility
power_output_prediction_ann.ipynb Jupyter notebook containing full model workflow and evaluation
assets/ Folder containing result plots and project thumbnail
├── power_output_thumbnail.png Thumbnail image summarizing the project
├── results_training_validation_loss.png Line plot of training vs validation loss
├── results_actual_vs_predicted.png Scatter plot comparing actual vs predicted outputs
└── results_residuals_distribution.png Histogram of residuals distribution

🌱 Future Improvements

  • 🔍 Hyperparameter optimization (Grid / Bayesian search)
  • 🧮 Model benchmarking (ANN vs RF vs XGBoost)
  • 🧠 Cross-validation and uncertainty quantification
  • ⚙️ Deployment as REST API (FastAPI / Flask)
  • 📈 Integration with MLflow or Weights & Biases

📚 References


📄 License

This project is licensed under the MIT License.
See the LICENSE file for details.


👤 Author

Arian Jr.
📧 My Email
🔗 My GitHub


Made with ❤️ by ArianJr

⭐ If you found this project useful, please consider giving it a star! It helps others discover it and supports my work.


GitHub stars GitHub forks

About

Power output prediction for a combined cycle power plant using an Artificial Neural Network (ANN). Includes data preprocessing, model training, performance evaluation, and result visualization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published