Abstract:
การศึกษานี้มุ่งเน้นการประยุกต์ใช้เทคโนโลยีแมชชีนเลิร์นนิง (Machine Learning) เพื่อพยากรณ์ค่าดัชนีคุณภาพน้ำ (Water Quality Index: WQI) ของแม่น้ำท่าจีน โดยอาศัยข้อมูลคุณภาพน้ำจากกรมควบคุมมลพิษ (BOD DO pH EC อุณหภูมิ และ COD) เพื่อเป็นตัวแทนของคุณภาพน้ำแม่น้ำท่าจีน การดำเนินการศึกษาประกอบด้วย การเตรียมข้อมูล ซึ่งมีความสำคัญในการคัดกรองข้อมูลที่ถูกต้องสำหรับการเรียนรู้ของแบบจำลอง เช่น การจัดการค่าที่ขาดหาย การกำจัดค่าผิดปกติ และการทำ Normalization เพื่อให้ได้ชุดข้อมูลที่มีคุณภาพสำหรับการฝึกแบบจำลอง แบบจำลองที่นำมาทดสอบ ได้แก่ Random Forest Linear Regression Support Vector Machine (SVM) K-Nearest Neighbors (KNN) Decision Tree และ AdaBoost ข้อมูลจะถูกแบ่งออกเป็น 2 ชุด ชุดแรกสำหรับการฝึกและทดสอบแบบจำลองโดยใช้วิธี K-fold Cross Validation และชุดที่ 2 สำหรับคาดการณ์ที่ Forecast period โดยจากการฝึกและทดสอบด้วย 5-Fold Cross Validation แบบจำลอง Random Forest มีศักยภาพดีที่สุดที่ R² = 0.84 จึงนำมาคาดการณ์ WQI ล่วงหน้า (5 10 และ 17 ชั่วโมง) ด้วยเทคนิค Sliding Window กับ Direct Multi-Step Forecasting พบว่าการคาดการณ์ 5 ชั่วโมงล่วงหน้าดีที่สุด (R² = 0.66) ผลการคาดการณ์ WQI โดยใช้เพียงพารามิเตอร์คุณภาพน้ำสามารถเป็นตัวแทนของคุณภาพน้ำในพื้นที่ได้
This study focuses on the application of machine learning (ML) techniques to forecast the Water Quality Index (WQI) of the Tha Chin River, Thailand, using key parametersBOD, DO, pH, EC, temperature, and CODprovided by the Pollution Control Department as indicators of river water quality. The methodology emphasizes robust data preparation, including handling missing values, removing outliers, and normalization to ensure high-quality datasets for model training. Six supervised ML models were evaluated: Random Forest, Linear Regression, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Decision Tree, and AdaBoost. The dataset was divided into two parts: one for training and validating the models using K-fold Cross Validation, and the other for forecasting. Based on 5- fold cross-validation, Random Forest achieved the highest performance (R² = 0.84) and was selected to predict WQI at 5-, 10-, and 17-hour lead times using a sliding window with direct multi-step forecasting. The 5-hour forecast yielded the best accuracy (R² = 0.66). The results confirm that WQI can be effectively predicted using only water quality parameters, providing a practical and scalable approach for real-time water monitoring