KMITL Innovation Expo 2025 Logo

Air Quality Index Prediction Using Ensemble Machine Learning Methods

Abstract

This special problem aims to study and compare the performance of predicting the air quality index (AQI) using five ensemble machine learning methods: random forest, XGBoost, CatBoost, stacking ensemble of random forest and XGBoost, and stacking ensemble of random forest, SVR, and MLP. The study uses a dataset from the Central Pollution Control Board of India (CPCB), which includes fifteen pollutants and nine meteorological variables collected between January, 2021 and December, 2023. In this study, there were 1,024,920 records. The performance is measured using three methods: root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination. The study found that the random forest and XGBoost stacking ensemble had the best performance measures among the three methods, with the minimum RMSE of 0.1040, the minimum MAE of 0.0675, and the maximum of 0.8128. SHAP-based model interpretation method for five machine learning methods. All methods reached the same conclusion: the two variables that most significantly impacted the global prediction were PM2.5 and PM10, respectively.

Objective

ทั่วโลกกำลังเผชิญกับวิกฤตมลพิษทางอากาศที่รุนแรงที่สุดในประวัติศาสตร์ การเพิ่มขึ้นของสารมลพิษในอากาศ เช่น ฝุ่นละอองขนาดเล็ก PM2.5 PM10 ก๊าซโอโซน ก๊าซคาร์บอนมอนอกไซด์ ไนโตรเจนไดออกไซด์ และซัลเฟอร์ไดออกไซด์ ซึ่งส่งผลกระทบต่อระบบทางเดินหายใจและระบบไหลเวียนโลหิตของมนุษย์ นอกจากนี้ยังมีผลกระทบทางลบต่อพืชและสัตว์ในระบบนิเวศอีกด้วย หลายพื้นที่ทั่วโลกเผชิญกับค่า PM2.5 เกินมาตรฐานอย่างต่อเนื่อง องค์การอนามัยโลก (World Health Organization : WHO) ประกาศเตือนว่า PM2.5 เป็นสารก่อมะเร็ง ส่งผลให้เกิดโรคทางเดินหายใจ โรคหัวใจ และโรคหลอดเลือดสมอง PM2.5 เป็นมลพิษทางอากาศที่อันตรายที่สุด ส่งผลต่อระบบทางเดินหายใจและเพิ่มความเสี่ยงต่อมะเร็งปอด สถิติปี 2020 มีผู้เสียชีวิตจากมะเร็งปอด 1.79 ล้านคน และคาดว่าจำนวนผู้เสียชีวิตจะเพิ่มมากขึ้นทุกปีอย่างต่อเนื่อง ดัชนีคุณภาพอากาศ (Air Quality Index : AQI) เป็นตัวชี้วัดสำคัญในการประเมินคุณภาพอากาศและบ่งชี้ถึงระดับของมลพิษ โดยใช้ข้อมูลความเข้มข้นของมลพิษในอากาศคำนวณเป็นค่าดัชนีคุณภาพอากาศที่ช่วยให้ประชาชนทราบถึงระดับความปลอดภัยของอากาศ ดังนั้นหากในชีวิตประจำวันสามารถทำนายดัชนีคุณภาพอากาศได้ ประชาชนจะสามารถวางแผนการเดินทางหรือการทำกิจกรรมกลางแจ้ง โดยหลีกเลี่ยงบริเวณที่มีมลพิษสูงได้ โดยเฉพาะกลุ่มเสี่ยง เช่น ผู้สูงอายุ เด็กเล็ก และผู้ป่วยเรื้อรัง ในช่วงหลายปีที่ผ่านมา มีงานวิจัยที่ได้พัฒนาวิธีการทำนายดัชนีคุณภาพอากาศโดยนักวิจัยได้ประยุกต์ใช้วิธีการเรียนรู้ของเครื่อง (Machine Learning) เพื่อการทำนายคุณภาพอากาศให้ดียิ่งขึ้น ในงานวิจัยนี้ คณะผู้วิจัยจึงมีความสนใจนำวิธีการเรียนรู้ของเครื่องแบบรวมกลุ่มมาใช้ในการทำนายดัชนีคุณภาพอากาศ จากการทบทวนวรรณกรรมเกี่ยวกับงานวิจัยที่เกี่ยวข้อง คณะผู้วิจัยพบว่าในงานวิจัยของ Zhang et al. (2023) ที่ศึกษาในกลุ่มเมืองของจีน 6 แห่ง ด้วยข้อมูลมลพิษและสภาพอากาศ พบได้ว่าวิธีป่าสุ่มมีประสิทธิภาพดีที่สุดเมื่อวัดด้วย MAE ต่อมาในงานวิจัยของ Dao et al. (2022) ที่ได้ใช้ข้อมูลมลพิษในอินเดีย พบว่าวิธี XGBoost มีประสิทธิภาพดีที่สุด เช่นเดียวกับงานวิจัยของ Kumar and Pande (2023) ในขณะที่ Ravindiran et al. (2023) ได้ศึกษาด้วยข้อมูลมลพิษและสภาพอากาศในรัฐอานธรประเทศ พบว่าวิธี CatBoost มีประสิทธิภาพดีที่สุด และอีก 2 งานวิจัยที่ได้อาศัยแนวทางการรวมกลุ่มแบบ Stacking ได้แก่ งานวิจัยของ Sharma et al. (2024) ที่ศึกษาในหลายเมืองของอินเดียโดยได้ใช้วิธีการรวมกลุ่มของต้นไม้ตัดสินใจหลายวิธี หนึ่งในนั้นคือวิธีการรวมกลุ่มป่าสุ่มและ XGBoost ซึ่งก็พบว่าวิธีดังกล่าวมีประสิทธิภาพดีที่สุด และ Emeç and Yurtsever (2024) ได้ศึกษาการทำนายความเข้มข้นของ PM2.5 ซึ่งเป็นหนึ่งในมลพิษสำคัญที่ส่งผลต่อดัชนีคุณภาพอากาศของเมืองอิสตันบลูและปักกิ่งโดยใช้วิธีการเรียนรู้ของเครื่อง 3 วิธีมารวมกันเป็นวิธีรวมกลุ่มป่าสุ่ม, SVR และ MLP พบว่าวิธีนี้มีประสิทธิภาพดีกว่าการใช้ทั้ง 3 วิธีแยกกัน ดังนั้นคณะผู้วิจัยจึงสนใจนำวิธีการเรียนรู้ของเครื่องแบบรวมกลุ่มทั้ง 5 วิธี ได้แก่ วิธีป่าสุ่ม วิธี XGBoost วิธี CatBoost วิธีรวมกลุ่มป่าสุ่มและ XGBoost และวิธีรวมกลุ่มป่าสุ่ม, SVR และ MLP โดยใช้ข้อมูลเกี่ยวกับค่ามลพิษและสภาพอากาศจากสถานีตรวจวัดในรัฐเดลี ประเทศอินเดีย ซึ่งเป็นพื้นที่ที่มีปัญหาด้านคุณภาพอากาศเป็นอันดับต้น ๆ ของโลก โดยใช้ข้อมูลตั้งแต่วันที่ 1 มกราคม 2021 ถึง 31 ธันวาคม 2023 และวิธีการวัดประสิทธิภาพ 3 วิธี ได้แก่ รากของค่าคลาดเคลื่อนกำลังสองเฉลี่ย ค่าคลาดเคลื่อนสัมบูรณ์เฉลี่ย และสัมประสิทธิ์การกำหนด (Coefficient of Determination) เปรียบเทียบประสิทธิภาพของวิธีการต่าง ๆ และระบุแนวทางที่เหมาะสมที่สุดในการทำนายดัชนีคุณภาพอากาศ

Other Innovations

Development of the intelligent indicator label for monitoring rancidity of deep fried foods

คณะวิศวกรรมศาสตร์

Development of the intelligent indicator label for monitoring rancidity of deep fried foods

The production process of the food rancidity indicator label consists of three main steps: 1) preparation of the indicator solution, 2) preparation of the cellulose solution, and 3) formation of the sheet. The indicator solution includes bromothymol blue and methyl red, which act as indicators. The cellulose solution consists of hydroxypropyl methylcellulose, carboxymethyl cellulose, sodium hydroxide, polyethylene glycol 400, and the indicator solution. For the sheet formation, the cellulose solution was mixed with natural latex to increase flexibility and impart hydrophobic properties. After drying, the invention appears as a thin, dark blue label. When exposed to volatile compounds from rancid food, the label changes color from dark blue to green, and then to yellow, corresponding to the increasing amount of volatile compounds from the rancid food.

Read more
Detection of Durian Leaf Diseases Using Image Analysis and Artificial Intelligence

คณะเทคโนโลยีการเกษตร

Detection of Durian Leaf Diseases Using Image Analysis and Artificial Intelligence

Durian is a crucial economic crop of Thailand and one of the most exported agricultural products in the world. However, producing high-quality durian requires maintaining the health of durian trees, ensuring they remain strong and disease-free to optimize productivity and minimize potential damage to both the tree and its fruit. Among the various diseases affecting durian, foliar diseases are among the most common and rapidly spreading, directly impacting tree growth and fruit quality. Therefore, monitoring and controlling leaf diseases is essential for preserving durian quality. This study aims to apply image analysis technology combined with artificial intelligence (AI) to classify diseases in durian leaves, enabling farmers to diagnose diseases independently without relying on experts. The classification includes three categories: healthy leaves (H), leaves infected with anthracnose (A), and leaves affected by algal spot (S). To develop the classification model, convolutional neural network (CNN) algorithms—ResNet-50, GoogleNet, and AlexNet—were employed. Experimental results indicate that the classification accuracy of ResNet-50, GoogleNet, and AlexNet is 93.57%, 93.95%, and 68.69%, respectively.

Read more
Testing of Electric Vehicle Supply Equipment (EVSE) based on  IEC 61851-1 Annex A

คณะวิศวกรรมศาสตร์

Testing of Electric Vehicle Supply Equipment (EVSE) based on IEC 61851-1 Annex A

This project focuses on developing a test device for an AC charger for electric vehicles according to the IEC 61851-1 Annex A standard by simulating the test circuit inside an electric vehicle according to the standard to test the operation of the AC charger. The test topic is related to the communication between the electric vehicle and the charger via a Pulse Width Modulation (PWM) control circuit system and creating an operation manual (WI) to prepare for testing in accordance with ISO/IEC 17025 standards, which are general requirements for laboratory capabilities in conducting tests and/or calibrations. The overall picture of this project is to develop test equipment and create an operation manual by collecting knowledge and various devices and then comparing the data to meet the abovementioned standards to test the Type II AC charger in each state. The test equipment consists of a communication part between the test equipment and the AC charger using a PLC S7-1200 and an HMI to control the operation of the switches in the test equipment circuit, including controlling parameters and displaying results. The equipment used to measure values ​​is an oscilloscope and a multimeter that have undergone a calibration process to comply with the specified standards.

Read more