Skip to content

Argonaut790/HK-Temperature-Forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global-Solar-Radiation-in-King-s-Park

Utilizing Machine Learning Regression Model to predict tge global solar radiation using the data that collected in King's Park

First Approach - Trying to predict the average temperature

  • Using MySQL and query to handle data
  • Using variables including bright sun time, relative humidity and global solar radiation
  • Analysing Linear Regression and various degrees of Polynomial Regression's accuracy
  • Result: Data Correlation are bad, also may be due to city's heat island effect, it's not that easy to predict with such a little dataset that could be found on the gov db, r2 = 0.47

 

Second Approach - Turn the predicting variable to the GSR

  • Turned to use pandas to handle data
  • Added 3 more variables including rainfall, uv and mean wind speed
  • Preprocessed the data with feature selection and normalization

Result

Polynomial Regression's Degree Optimization

  • After the data preprocessing, using degree=6 to optimize the model

 

Prediction Result on GSD with AVG_TEMP, SUN and UV

  • r2 = 0.9044

 

Correlation

EMPTY AVG_TEMP GSR RH SUN RF UV WSPD
AVG_TEMP 1.000000 0.439289 0.294813 0.261222 0.143698 0.360520 -0.069801
GSR 0.439289 1.000000 -0.143867 0.905922 -0.305681 0.122465 -0.100102
RH 0.294813 -0.143867 1.000000 -0.274133 0.219243 0.236309 0.013089
SUN 0.261222 0.905922 -0.274133 1.000000 -0.291873 -0.006021 -0.143479
RF 0.143698 -0.305681 0.219243 -0.291873 1.000000 0.130049 0.064917
UV 0.360520 0.122465 0.236309 -0.006021 0.130049 1.000000 -0.033784
WSPD -0.069801 -0.100102 0.013089 -0.143479 0.064917 -0.033784 1.000000

Run Locally

  1. Clone the project to your repository
git clone https://github.com/Argonaut790/Global-Solar-Radiation-in-King-s-Park.git
  1. Change to the project directory
cd .\Global-Solar-Radiation-in-King-s-Park
  1. Install the package and dependencies
pip install -r requirements.txt

License

MIT license

About

using machine learning to predict the solar radiation using the data from King's Park

Topics

Resources

License

Stars

Watchers

Forks

Contributors