VARIANSI: Journal of Statistics and Its Application on Teaching and Research
Vol. 8 No. 02 (2026)

Application of the K-Nearest Neighbor (K-NN) Algorithm for Disease Classification Based on Eye Images

St. Nadira Zalzabila Zalzabila (Universitas Negeri Makassar)
Sudarmin (Universitas Negeri Makassar)
Zulkifli Rais (Universitas Negeri Makassar)



Article Info

Publish Date
30 Sep 2026

Abstract

Eye diseases are one of the health issues that can lead to a decline in visual acuity if not detected and treated at an early stage. With advances in digital image processing and machine learning technologies, eye images can be utilised as a source of information to support the automated classification of eye diseases. This study aims to apply the K-Nearest Neighbour (K-NN) algorithm to classify eye diseases based on eye images. The dataset used in this study consists of 4,217 eye images categorised into four classes: cataract, glaucoma, diabetic retinopathy, and normal. The research stages included image pre-processing, comprising conversion to greyscale images, normalisation, segmentation, and resizing. Next, texture features were extracted using the Gray Level Co-occurrence Matrix (GLCM) method to obtain features representing the characteristics of the eye images. The data were then split into training and test sets in an 80:20 ratio before classification was carried out using the K-NN algorithm. The evaluation results show that the K-NN algorithm with K = 7 achieved an accuracy rate of 81 per cent, indicating that the model is able to classify the majority of eye images accurately.

Copyrights © 2026






Journal Info

Abbrev

variansi

Publisher

Subject

Decision Sciences, Operations Research & Management Economics, Econometrics & Finance Mathematics

Description

VARIANSI: Journal of Statistics and Its application on Teaching and Research memuat tulisan hasil penelitian dan kajian pustaka (reviews) dalam bidang ilmu dasar ataupun terapan dan pembelajaran dari bidang Statistika dan Aplikasinya dalam pembelajaran dan riset berupa hasil penelitian dan kajian ...