Predicting the electrical power output of a Combined Cycle Power Plant using Deep Learning
Built with TensorFlow • Keras • NumPy • Scikit-Learn • Matplotlib
- Project Overview
- Motivation
- Dataset
- Model Architecture
- Results & Evaluation
- Getting Started
- Example Usage
- Repository Structure
- Future Improvements
- References
- License
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.
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
- Source: UCI Machine Learning Repository — CCPP Dataset
- Samples: 9,568
- Features:
- Ambient Temperature (AT, °C)
- Ambient Pressure (AP, mbar)
- Relative Humidity (RH, %)
- Exhaust Vacuum (V, cm Hg)
- Target: Electrical energy output (PE, MW)
Preprocessing includes:
- Missing value handling
- Feature scaling / normalization
- Train-validation-test split
| 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
| Metric | Train | Validation |
|---|---|---|
| MSE | 0.0032 | 0.0037 |
| R² | 0.94 | 0.93 |
Visual Insights:
- ✅ Training vs Validation Loss Curve
- ✅ Predicted vs Actual Scatter Plot
- ✅ Residual Distribution Plot
| 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.txtRun the notebook interactively:
jupyter notebook power_output_prediction_ann.ipynbfrom 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")| 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 |
- 🔍 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
- Dataset: UCI Machine Learning Repository – Combined Cycle Power Plant Dataset
- Frameworks: TensorFlow, Keras, Scikit-Learn
- Paper: Pınar Tüfekci (2014) — Prediction of full load electrical power output using machine learning methods
This project is licensed under the MIT License.
See the LICENSE file for details.
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.


