Developing a Machine Learning Based Classification Model for Heavy Metal Contamination Levels in Mangrove Sediments 10.32526/ennrj/24/20250355

Main Article Content

Harry Irawan Johari

Abstract

Mangrove ecosystems play an important role in mitigating heavy metal pollution in coastal environments; however, direct assessment of their phytoremediation potential commonly relies on intensive field sampling and laboratory analyses. This study develops a machine learning-based prediction model to classify heavy metal contamination levels in mangrove sediments as a supporting tool for phytoremediation planning. A publicly available sediment dataset obtained from Kaggle, consisting of 300 samples with concentrations of Pb, Zn, Cr, Cu, and Ni, was used as a methodological testbed. Data preprocessing included feature normalization, label encoding, and class balancing using the Synthetic Minority Over-sampling Technique (SMOTE), followed by an 80:20 train-test split. Four classification algorithms Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and XGBoost, were evaluated using accuracy, precision, recall, and F1-score metrics. Random Forest and SVM achieved the highest classification performance (92.5% accuracy), while KNN showed the lowest accuracy (81.5%). Feature importance analysis identified Cr, Pb, and Zn as the most influential variables in contamination level classification. Although the dataset is not site-specific and lacks ecological metadata, the results demonstrate the technical feasibility of machine learning models for sediment contamination classification. This study is positioned as a methodological proof-of-concept and highlights the need for future research integrating field-validated sediment data, mangrove species information, and biological uptake indicators to support robust phytoremediation assessments.

Article Details

How to Cite
Johari, H. I. (2026). Developing a Machine Learning Based Classification Model for Heavy Metal Contamination Levels in Mangrove Sediments: 10.32526/ennrj/24/20250355. Environment and Natural Resources Journal, xx. retrieved from https://ph02.tci-thaijo.org/index.php/ennrj/article/view/262651
Section
Original Research Articles

References

Acharya S, Pradhan M, Mahalik G, Babu R, Parida S, Mohapatra PK. Abiotic stress tolerance in mangroves with a special reference to salinity. Plant Science Today 2023;10(2):58-68.

Akbar SA, Jalil Z, Octavina C, Setiawan I, Ulfah M, Iqbal TH, et al. Harnessing mangrove phytoremediation for coastal heavy metal pollution: A chemical environmental perspective. Maritime Technology and Research 2026;8(1):Article No. 281734.

Alotaibi S, Elgamouz A, Kawde AN, Mosa KA, BenHaiba S, Abbadi S El. Integrated electrochemical and spectroscopic assessment of heavy metal bioaccumulation in mangrove plants: A sustainable strategy for environmental monitoring and risk mitigation. Journal of Hazardous Materials Advances 2025;20:Article No. 100878.

Alharbi HS. Interpretable and calibrated XGBoost framework for risk-informed probabilistic prediction of slope stability. Sustainability (Switzerland) 2025;17:Article No. 10122.

Bacosa HP, Parmisana JRL, Sahidjan NIU, Tumongha JMB, Valdehueza KAA, Maglupay JRU, et al. Navigating the depths: A comprehensive review of 40 years of marine oil pollution studies in the Philippines (1980 to 2024). Water (Switzerland) 2025;17:1-24.

Bello HT, Sylvester OO, Innocent NO, Imelda NN, Irene LS, Enyinna O, et al. Distribution and interactions of priority heavy metals with some antioxidant micronutrients in inhabitants of a lead-zinc mining community of Ebonyi State, Nigeria. Advances in Toxicology and Toxic Effects 2020; 4(1):11-7.

Carrillo KC, Rodríguez-Romero A, Tovar-Sánchez A, Ruiz-Gutiérrez G, Fuente JRV. Geochemical baseline establishment, contamination level and ecological risk assessment of metals and As in the Limoncocha lagoon sediments, Ecuadorian Amazon region. Journal of Soils and Sediments 2022;22:293-315.

Chen L, Han B, Wang X, Zhao J, Yang W, Yang Z. Machine learning methods in weather and climate applications: A survey. Applied Sciences (Switzerland) 2023;13(21):Article No. 12019.

Crane JL, Bijak AL, Maier MA, Nord MA. Development of current ambient background threshold values for sediment quality parameters in U.S. lakes on a regional and statewide basis. Science of the Total Environment 2021;793:Article No. 148630.

Devan P, Khare N. An efficient XGBoost-DNN-based classification model for network intrusion detection system. Neural Computing and Applications 2020;32:12499-514.

Drogkoula M, Kokkinos K, Samaras N. A comprehensive survey of machine learning methodologies with Emphasis in water resources management. Applied Sciences (Switzerland) 2023;13(22):Article No. 12147.

El-Sharkawy M, Alotaibi MO, Li J, Du D, Mahmoud E. Heavy metal pollution in coastal environments: Ecological implications and management strategies: A review. Sustainability (Switzerland) 2025;17(2):Article No. 701.

Elreedy D, Atiya AF, Kamalov F. A theoretical distribution analysis of synthetic minority oversampling technique (SMOTE) for imbalanced learning. Machine Learning 2024; 113:4903-23.

Gambin AF, Angelats E, Gonzalez JS, Miozzo M, DIni P. Sustainable Marine Ecosystems: Deep Learning for Water Quality Assessment and Forecasting. IEEE Access 2021;9:121344-65.

Guo H, Song Z, Wang S, Yan S, Wang Y, Gao Y, et al. Assessment of heavy metal contamination and ecological risk in mangrove marine sediments inside and outside Zhanjiang Bay: Implications for conservation. Journal of Marine Science and Engineering 2025;13:1-15.

Gündoğdu S. Efficient prediction of early-stage diabetes using XGBoost classifier with random forest feature selection technique. Multimedia Tools and Applications 2023; 82:34163-81.

Hamidou ST, Mehdi A. Enhancing IDS performance through a comparative analysis of Random Forest, XGBoost, and Deep Neural Networks. Machine Learning with Applications 2025;22:Article No. 100738.

Hassan MSADH, Al Naqeeb NA, Al-Musawi MR, Banoon SR, Mohammed K, Bilal M, et al. Using artificial intelligence to predict aquatic pollution: A comprehensive review. International Journal of Aquatic Biology 2025;13:50-67.

Hossain MB, Masum Z, Rahman MS, Yu J, Noman MA, Jolly YN, et al. Heavy metal accumulation and phytoremediation potentiality of some selected mangrove species from the world’s largest mangrove forest. Biology (Basel) 2022;11(8):Article No. 1144.

Imani M, Beikmohammadi A, Arabnia HR. Comprehensive analysis of random forest and XGBoost performance with SMOTE, ADASYN, and GNUS under varying imbalance levels. Technologies (Basel) 2025;13:Article No. 88.

John J, Nandhini AR, Chellam PV, Sillanpää M. Microplastics in mangroves and coral reef ecosystems: A review. Environmental Chemistry Letters 2022;20:397-416.

Jongjaraunsuk R, Taparhudee W, Sirisuay S, Kaewnern M, Dulyapurk V, Janekitkarn S. Transfer learning model application for Rastrelliger brachysoma and R. kanagurta image classification using smartphone-captured images. Fishes 2024;9(3):Article No. 103.

Kavzoglu T, Teke A. Predictive performances of ensemble machine learning algorithms in landslide susceptibility mapping using random forest, extreme gradient boosting (XGBoost) and natural gradient boosting (NGBoost). Arabian Journal for Science and Engineering 2022;47:7367-85.

Khatun P, Umam S, Razzak RB, Shamsuddin IB, Salma N. A study on the effectiveness of machine learning models for hepatitis prediction. Scientific Reports 2025a;15:Article No. 30659.

Khruschev SS, Plyusnina TY, Antal TK, Pogosyan SI, Riznichenko GY, Rubin AB. Machine learning methods for assessing photosynthetic activity: Environmental monitoring applications. Biophysical Reviews 2022;14:821-42.

Koudenoukpo ZC, Odountan OH, Agboho PA, Dalu T, Van Bocxlaer B, de Bistoven LJ, et al. Using self-organizing maps and machine learning models to assess mollusc community structure in relation to physicochemical variables in a West Africa river-estuary system. Ecological Indicators 2021;126:Article No. 107706.

Kumari P, Kumar P. Metal(loid) source and effects on Peri-Urban agriculture/aquaculture sediments. In: Kumar P, Aishwarya, editors. Technological Approaches for Climate Smart Agriculture. Cham: Springer International Publishing; 2024. p. 133-64.

Lan J, Liu P, Hu X, Zhu S. Harmful algal blooms in eutrophic marine environments: Causes, monitoring, and treatment. Water (Switzerland) 2024;16(17):Article No. 2525.

Li D, Tian M, Ding W, Cisse EHM, Miao L, Ye B, et al. Dissecting possible correlations between leaf functional traits and heavy metal accumulation in two contrasting mangrove species across tidal gradients. Environmental and Experimental Botany 2025;238:Article No. 106234.

Maruf A Al, Fahim SH, Bashar R, Rumy RA, Chowdhury SI, Aung Z. Classification of freshwater fish diseases in Bangladesh using a novel ensemble deep learning model: Enhancing accuracy and interpretability. IEEE Access 2024;12:96411-35.

Mederos-Barrera A, Albors L, Marques F, Marcello J, Martinez G, Eugenio F. Comparison of conventional machine learning and convolutional deep learning models for seagrass mapping using satellite imagery. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 2026;19:3888-907.

Meraj G, Abouleish MY, Ali T, Hashimoto S, Marazi A, Chakrabortty R, et al. Middle Eastern mangroves at the arid limit (Red Sea and Arabian/Persian Gulf): Eco-biophysical dynamics, blue-carbon MRV, climate-risk pathways, and governance for resilient restoration: A comprehensive review. Frontiers in Marine Science 2025;12:1-31.

Mok WJ, Ghaffar MA, Noor MIM, Lananan F, Azra MN. Understanding climate change and heavy metals in coastal areas: A macroanalysis assessment. Water (Switzerland) 2023;15(5):Article No. 891.

Natras R, Soja B, Schmidt M. Ensemble machine learning of random forest, AdaBoost and XGBoost for vertical total electron content forecasting. Remote Sensing 2022;14:Article No. 3547.

Petrea SM, Costache M, Cristea D, Strungaru SA, Simionov IA, Mogodan A, et al. A machine learning approach in analyzing bioaccumulation of heavy metals in turbot tissues. Molecules 2020;25:Article No. 4696.

Reshma B, Rahul B, Sreenath KR, Joshi KK, Grinson G. Taxonomic resolution of coral image classification with Convolutional Neural Network. Aquatic Ecology 2023; 57:845-61.

Roy T, Dey TK, Jamal M. Microplastic/nanoplastic toxicity in plants: An imminent concern. Environmental Monitoring and Assessment 2023;195:Article No. 27.

Sannigrahi M, Thandeeswaran R. Predictive analysis of network-based attacks by hybrid machine learning algorithms utilizing Bayesian optimization, logistic regression, and random forest algorithm. IEEE Access 2024;12:142721-32.

Sari K, Soeprobowati TR. Impact of water quality detorioration in mangrove forest in Semarang Coastal Area. Indonesian Journal of Limnology 2021;2(2):37-48.

Sarwar J, Khan SA, Azmat M, Khan F. A comparative analysis of feature selection models for spatial analysis of floods using hybrid metaheuristic and machine learning models. Environmental Science and Pollution Research 2024; 31:33495-514.

Shahri NHNBM, Lai SBS, Mohamad MB, Rahman HABA, Rambli A Bin. Comparing the performance of adaboost, xgboost, and logistic regression for imbalanced data. Mathematics and Statistics 2021;9(3):79-85.

Shaika NA, Khan S, Awal S, Haque MM, Bashar A, Simsek H. Aquatic pollution in the Bay of Bengal: Impacts on fisheries and ecosystems. Hydrology 2025;12(7):Article No. 191

Tallam K, Nguyen N, Ventura J, Fricker A, Calhoun S, O’Leary J, et al. Application of deep learning for classification of intertidal Eelgrass from drone-acquired imagery. Remote Sensing 2023;15:1-13.

Wah YB, Ismail A, Azid NNN, Jaafar J, Aziz IA, Hasan MH, et al. Machine learning and synthetic minority oversampling techniques for imbalanced data: Improving machine failure prediction. Computers, Materials and Continua 2023; 75(3):4821-41.

Wong WY, Al-Ani AKI, Hasikin K, Khairuddin ASM, Razak SA, Hizaddin HF, et al. Water, soil and air pollutants’ interaction on mangrove ecosystem and corresponding artificial intelligence techniques used in decision support systems: A review. IEEE Access 2021;9:105532-63.

Yap CK, Al-Mutairi KA. Potentially toxic metals in the tropical mangrove non-salt secreting Rhizophora apiculata: A field-based biomonitoring study and phytoremediation potentials. Forests 2023;14(2);Article No. 237.

Yuan Y, Lin L. Self-supervised pretraining of transformers for satellite image time series classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 2021;14:474-87.

Zaka MM, Samat A. Advances in remote sensing and machine learning methods for invasive plants study: A comprehensive review. Remote Sensing 2024;16;Article No. 3781.