Abstract—Heavy metal contamination in coastal environments represents a growing environmental challenge that requires rapid and reliable assessment to support effective management and restoration strategies. Mangrove ecosystems are often exposed to such contamination, making sediment quality assessment an important component of phytoremediation planning. This study proposes a machine learning–based approach to classify heavy metal contamination levels in mangrove sediments using chemical parameters. The dataset, obtained from Kaggle, includes sediment concentrations of Pb, Zn, Cr, Cu, and Ni, along with corresponding contamination level categories. Data preprocessing involved feature normalization, label encoding, and class balancing using the Synthetic Minority Over-sampling Technique (SMOTE), followed by an 80:20 split into training and testing sets. 4 classification models Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Extreme Gradient Boosting (XGBoost) were evaluated using accuracy, precision, recall, and F1-score metrics. Results indicate that Random Forest and SVM achieved the highest performance, each reaching 92.5% accuracy with balanced precision, recall, and F1-score values (0.92–0.93). XGBoost showed competitive performance (91.5% accuracy; F1-score 0.916), while KNN yielded the lowest accuracy (81.5%). Model performance was strongest for the Moderate contamination class, whereas classification of the High class was more challenging due to class imbalance. Feature importance analysis identified Cr, Pb, and Zn as the most influential variables in contamination level classification. These findings demonstrate that machine learning models, particularly Random Forest and SVM, provide efficient and reliable tools for sediment contamination assessment, offering valuable support for phytoremediation planning and decision-making in contaminated coastal mangrove environments.
Keywords—mangrove, machine learning, phytoremediation, pollution, Extreme Gradient Boosting (XGBoost)
Cite: Harry Irawan Johari, "Machine Learning-Based Classification of Heavy Metal Contamination Levels in Mangrove Sediments to Support Phytoremediation Planning," International Journal of Environmental Science and Development vol. 17, no. 3, pp. 226-234, 2026.
Copyright © 2026 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).
