- Research Article
- 10.32526/ennrj/24/20250355
Developing a Machine Learning Based Classification Model for Heavy Metal Contamination Levels in Mangrove Sediments
- Jul 21, 2026
- Environment and Natural Resources Journal
- Harry Irawan Johari
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.
Read more