{"id":21445618,"url":"https://github.com/bharathwajmanoharan/airpollution_solution_ml","last_synced_at":"2025-03-17T01:23:03.031Z","repository":{"id":156631471,"uuid":"615357168","full_name":"BharathwajManoharan/AirPollution_Solution_ML","owner":"BharathwajManoharan","description":"Abinitio 2.0 (it took place in the library block, third floor gallery hall)","archived":false,"fork":false,"pushed_at":"2023-08-05T16:50:43.000Z","size":22280,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T11:19:10.479Z","etag":null,"topics":["arima-forecasting","machine-learning","mlhackathon","random-forest"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BharathwajManoharan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-17T14:08:46.000Z","updated_at":"2023-11-04T10:04:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"4425df49-a036-4597-9f6d-c5c2a2c200f7","html_url":"https://github.com/BharathwajManoharan/AirPollution_Solution_ML","commit_stats":null,"previous_names":["bharathwajmanoharan/airpollution_solution_ml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FAirPollution_Solution_ML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FAirPollution_Solution_ML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FAirPollution_Solution_ML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FAirPollution_Solution_ML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BharathwajManoharan","download_url":"https://codeload.github.com/BharathwajManoharan/AirPollution_Solution_ML/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955728,"owners_count":20374374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arima-forecasting","machine-learning","mlhackathon","random-forest"],"created_at":"2024-11-23T02:36:28.120Z","updated_at":"2025-03-17T01:23:03.005Z","avatar_url":"https://github.com/BharathwajManoharan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Abinito 2.0 ML Hackathon\n\n(was conducted on 17th of March 2023)\n\n\u003e In Today's ML hackathon, we have decided to tackle the pressing issue of air pollution in Indian cities. Our chosen theme involves developing solutions to identify sources of pollution, including industrial emissions and vehicular traffic. We believe that by addressing this issue, we can make a positive impact on the health and well-being of the community and the environment.\n\n## Packages used\n\n* Numpy\n* Pandas\n* Matplotlib\n* Seabrne\n* Sklearn (Gradient Boosting Regressor and Random Forest Regressor)\n* Joblib\n* Ipython\n\n## Models for Prediction:\n\n* `Random Forest` - Random forests or random decision forests are an ensemble learning method for classification, regression.\n\n* `Gradient Boosting Machine` -  can effectively capture complex patterns and provide accurate forecasts of AQI levels, even in the presence of noisy or missing data.\n\n* `ARIMA model` - use historical AQI data to identify patterns and trends, taking into account autocorrelation and lagged values. These models can provide accurate predictions of future AQI levels, informing policy decisions and public health interventions.\n\n## Code Examples\n\n````\n# Model Traiining (Random Forest):\n\nimport pandas as pd\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import mean_squared_error\n\n# Load data\ndata = pd.read_csv('air_quality_data.csv')\n\n# Split data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(data.drop('AQI', axis=1), data['AQI'], test_size=0.2, random_state=42)\n\n# Create random forest regressor\nrf = RandomForestRegressor(n_estimators=100, random_state=42)\n\n# Train the model\nrf.fit(X_train, y_train)\n\n# Make predictions on the testing data\ny_pred = rf.predict(X_test)\n\n# Evaluate the model using mean squared error\nmse = mean_squared_error(y_test, y_pred)\nprint(f\"Random Forest MSE: {mse}\")\n\n````\n\n\n\n````\n# Model Traiining (Gradient Boosting machine):\n\nimport pandas as pd\nfrom sklearn.ensemble import GradientBoostingRegressor\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import mean_squared_error\n\n# Load data\ndata = pd.read_csv('air_quality_data.csv')\n\n# Split data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(data.drop('AQI', axis=1), data['AQI'], test_size=0.2, random_state=42)\n\n# Create GBM regressor\ngbm = GradientBoostingRegressor(n_estimators=100, learning_rate=0.1, random_state=42)\n\n# Train the model\ngbm.fit(X_train, y_train)\n\n# Make predictions on the testing data\ny_pred = gbm.predict(X_test)\n\n# Evaluate the model using mean squared error\nmse = mean_squared_error(y_test, y_pred)\nprint(f\"GBM MSE: {mse}\")\n\n````\n\n## Features\n\nThe choice of features for air quality forecasting may depend on the specific dataset and the location for which the forecasting is being done. However, some common features that are often used in air quality forecasting models include:\n\n* Temperature (°C),\n* Wind Speed (Km/h),\n* Pressure (Pa),\n* NO2 (ppm),\n* Rainfall (Cm),\n* PM10 (μg/m3),\n* PM2.5 (μg/m3),\n* AQI.\n\nIn addition to these features, there may be other factors that contribute to air pollution in specific locations that could be added to the model in the future. For example, if there are specific sources of pollution that are not captured in the existing features, such as agricultural activity or natural disasters like wildfires, they could be added to the model to improve its accuracy. Additionally, new types of data sources, such as satellite imagery or social media data, could be incorporated into the model to provide additional insights into air quality patterns and sources of pollution.\n\n## Status\n\nAccuracy: Close to 80% (77.3,77.8,78.6 respectively)\n\nProject is: _finished_.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharathwajmanoharan%2Fairpollution_solution_ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbharathwajmanoharan%2Fairpollution_solution_ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharathwajmanoharan%2Fairpollution_solution_ml/lists"}