# Data Driven Approach for Eye Disease Classification with Machine Learning
## 3 Methodology Adopted
### Model Description  
The proposed model is based on real-time patient data from electronic health records. It uses multiple examinations and analyzes patient records from various perspectives, as medical experts do. Figure 5 shows the entire process in detail. Initially, the visual function test is used to start the diagnostic process. If the visual acuity of a patient is observed to be perfect (i.e., measured to be 20/20 or 6/6), then there is no vision problem; however, the patient may have some allergic eye disorders. Thus, the first decision will be made on the basis of visual acuity. If it is not perfect, then the pinhole value is considered. If pinhole vision improves to 20/20 or 6/6 according to selected scales, then the patient will be prescribed glasses and the diagnosis, according to ICD-10, will be pediatric/strabismus \(\rightarrow\) refractive error. More specifically, the diagnosis will be myopia for nearsightedness and hypermetropia for longsightedness. If pinhole vision is not improved to perfect values, then slit lamp posterior segment examination will be performed to reach a diagnosis. A Java code on the MyEclipse tool was developed that decides on the basis of visual acuity and pinhole values whether the patient requires further investigation or not. If the problem is not refractive error, then the slit lamp examination and posterior segment examination will facilitate the prediction of the predefined diagnosis class. In this step, missing values are removed from the dataset. If the diagnosis is refractive error, then the anterior and posterior segment examination attributes will remain empty. Therefore, by removing those instances, complete data is passed to the classification module. Thus, after the first step, the data is divided into two parts: one for patients with refractive error and the other for all other diseases. Another goal is to add general health data (illness history) as a contributing attribute for automatic disease classification. Accordingly, keyword selection was performed based on frequently presented complaints, such as decreased vision and watering eyes. It was observed that patients do not generally know or understand medical terms; therefore, they always use ordinary words to describe their problem, such as itching, watering or frequent blinking. Moreover, experts should be aware of other medical conditions, such as diabetes, hypertension, migraine or uveitis. Therefore, it is more convenient to compile a keyword list of history/health data and store it as the complaint attribute value. Data from the slit lamp exam is in the form of structured hierarchies written as textual values. The record of a single patient may contain one or multiple symptoms originating in the same or different parts of the eye. To handle this, a multi-label data mechanism is used for arranging multiple symptoms. In addition to symptoms from the slit lamp examination, there is another vital diagnostic test based on symptoms from the posterior eye segment that identifies disorders in macula, retina or the optic nerve. The machine-learning algorithm will then use the behavior learned from previous records available in the database and compare the current combination of slit lamp/external exam symptoms and posterior segment symptoms with those in the database to give an accurate diagnosis on the basis of all input attributes. Diagnosis is also in the form standard taxonomies defined by ICD-10 and maintained by the World Health Organization. Thereby, machine learning algorithms are used for decision making at various stages and they use their learning capabilities for the prognosis of eye diseases. Most of the data considered in this study were either in numeric or nominal/textual form. Figure 5: Framework for the prediction of eye diseases: Data are collected and its analysis is used for disease prediction by comparison with expert diagnosis for correct classification. Four different algorithms were used to authenticate the predicted results.