This project is a Machine Learning-based web application that predicts solar power generation (kW) using weather and atmospheric parameters. The application helps estimate the expected power output of a solar power plant based on environmental conditions.
The model is trained using historical weather and solar power generation data and is deployed using Flask.
- Predict solar power generation using weather parameters.
- Machine Learning model built using XGBoost Regressor.
- Data preprocessing and feature selection.
- User-friendly web interface built with HTML, CSS, and Flask.
- Fast and accurate predictions.
- Ready for deployment on Render.
- Python
- Scikit-learn
- XGBoost
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Flask
- HTML
- CSS
- Joblib
- Git
- GitHub
- Render
Solar-Power-Prediction/
│
├── model/
│ ├── xgboost_model.pkl
│ └── feature_names.pkl
│
├── static/
│ └── style.css
│
├── templates/
│ └── index.html
│
├── train.py
├── app.py
├── requirements.txt
├── README.md
└── dataset.zip
The dataset contains historical weather and solar power generation data.
- generated_power_kw
- Angle of Incidence
- Total Cloud Cover
- Zenith Angle
- Azimuth Angle
- Shortwave Radiation
- Total Precipitation
- Low Cloud Cover
- Wind Gust
- Data Collection
- Data Cleaning
- Exploratory Data Analysis (EDA)
- Feature Selection
- Train-Test Split
- Model Training
- Model Evaluation
- Hyperparameter Tuning
- Model Saving
- Flask Web Application
- Deployment
- Linear Regression
- Decision Tree Regressor
- XGBoost Regressor ✅ (Best Model)
The following metrics were used:
- R² Score
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
Among all the trained models, XGBoost Regressor achieved the best overall performance and was selected for deployment.
Clone the repository
https://github.com/kesharisneha340-blip/Solar-Power-PredictionMove into the project folder
cd solar-power-predictionInstall dependencies
pip install -r requirements.txtRun the application
python app.pyOpen your browser
http://127.0.0.1:5000
User Inputs Weather Parameters
│
▼
Flask Web Application
│
▼
Load Trained XGBoost Model
│
▼
Predict Solar Power Generation
│
▼
Display Prediction
- Solar Power Plants
- Smart Grid Systems
- Renewable Energy Forecasting
- Energy Management
- Sustainable Energy Planning
- Smart Cities
- Real-time weather API integration.
- Automatic weather data collection.
- Interactive dashboard.
- Prediction history.
- Mobile-friendly interface.
- Cloud deployment with Docker and CI/CD.
https://solar-power-prediction-orc1.onrender.com/
Sneha
Machine Learning & AI Enthusiast
This project was developed as part of an internship to demonstrate the complete Machine Learning workflow, including data preprocessing, model training, evaluation, web application development, and deployment.