Air Quality prediction by using Machine learning
1 min readAug 1, 2020
Predicting Air quality by using Machine learning supervised algorithms.
About Data set(AirPi Data — AirPi.csv file)
- Data set contains 9 features and 1 target variable i.e air_quality.
- It contains 14572 data points and i divide data into 70%(train) and 30%(test).
- Basically i am not did any exploratory data analysis on this data set. If you are interested you can contribute to that.
Trained models
It is a regression problem so i trained 3 models i.e
- Linear regression
- Random forest regressor
- XGboost regressor
In this process i also did hyper parameter tuning by using Randomsearchcv then trained the model again.
Performance metrices
- Mean squared error(MSE)
- Mean absolute percentage error(MAPE)
- R2 score
Conclusion
- I found out XGboost regressor is less overfitting compare to remaining two models. But Random forest regressor giving the best results in terms of error.
- So in above Airpi_output.csv file i added 3 more columns and appended predicted values of every model for each data point.