K-Nearest Neighbors Model to Optimize Data Classification According to the Water Quality Index of the Upper Basin of the City of Huarmey

Water quality in Peru is an increasing concern, particularly in the upper Huarmey watershed, which is affected by heavy metal contamination and untreated wastewater. This study proposes an automated classification approach using three supervised machine learning algorithms—K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Random Forest (RF)—to assess the water quality based on the Water Quality Index (WQI) of Peru. The experimental results show that KNN outperforms other methods, reaching an accuracy of 95.2%. The proposed system automates and improves the classification accuracy compared with manual methods based on Microsoft Excel. The methodology, performance metrics, dataset characteristics, and geographical context are detailed to ensure replicability. This algorithm assists decision-makers with environmental monitoring and public health protection.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2025-09-19
DOI
https://doi.org/10.3390/app151810202
Citations
1
Primary Topic
Water Quality and Pollution Assessment
Type
article
Field-Weighted Citation Impact
0.82

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

K-Nearest Neighbors Model to Optimize Data Classification According to the Water Quality Index of the Upper Basin of the City of Huarmey

Hugo Vega-Huerta, Gisella Luisa Elena Maquen-Niño, Percy Edwin De la Cruz Vélez de Villa, Oscar Benito-Pacheco et al.
1 citations
Applied Sciences
Water Quality and Pollution Assessment
0.82
article

K-Nearest Neighbors Model to Optimize Data Classification According to the Water Quality Index of the Upper Basin of the City of Huarmey

Hugo Vega-Huerta, Gisella Luisa Elena Maquen-Niño, Percy Edwin De la Cruz Vélez de Villa, Oscar Benito-Pacheco, Hugo D. Calderon-Vilca, Adegundo Cámara-Figueroa, Rubén Gil-Calvo, Luis Guerra-Grados, Jean Pajuelo-León, Milton E. Rios-Castillo
article en
1 citations

Abstract

Water quality in Peru is an increasing concern, particularly in the upper Huarmey watershed, which is affected by heavy metal contamination and untreated wastewater. This study proposes an automated classification approach using three supervised machine learning algorithms—K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Random Forest (RF)—to assess the water quality based on the Water Quality Index (WQI) of Peru. The experimental results show that KNN outperforms other methods, reaching an accuracy of 95.2%. The proposed system automates and improves the classification accuracy compared with manual methods based on Microsoft Excel. The methodology, performance metrics, dataset characteristics, and geographical context are detailed to ensure replicability. This algorithm assists decision-makers with environmental monitoring and public health protection.

Applied SciencesVol. 15(18)
National University of San Marcos (PE), Universidad Nacional Pedro Ruíz Gallo (PE)
Universidad Nacional Mayor de San Marcos
Openalex Percentile: Top 23%
Water Quality and Pollution Assessment
0.82
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.