Decision support system for determining the contact lens for refractive errors patients with classification ID3

Refractive errors are abnormalities of the refraction of light so that the shadows do not focus precisely on the retina resulting in blurred vision [1]. Refractive errors causing the patient should wear glasses or contact lenses in order eyesight returned to normal. The use of glasses or contact lenses in a person will be different from others, it is influenced by patient age, the amount of tear production, vision prescription, and astigmatic. Because the eye is one organ of the human body is very important to see, then the accuracy in determining glasses or contact lenses which will be used is required. This research aims to develop a decision support system that can produce output on the right contact lenses for refractive errors patients with a value of 100% accuracy. Iterative Dichotomize Three (ID3) classification methods will generate gain and entropy values of attributes that include code sample data, age of the patient, astigmatic, the ratio of tear production, vision prescription, and classes that will affect the outcome of the decision tree. The eye specialist test result for the training data obtained the accuracy rate of 96.7% and an error rate of 3.3%, the result test using confusion matrix obtained the accuracy rate of 96.1% and an error rate of 3.1%; for the data testing obtained accuracy rate of 100% and an error rate of 0.


Introduction
Most optical stores in Indonesia does not provide experts to assist in determining the right eye glasses or contact lenses for refractive errors patients by reason of inability to pay the expert eye. This research aims to develop a decision support system that can produce output on the right contact lenses for refractive errors patients with a value of 100% accuracy so as to replace the services of an eye expert in optical.
Iterative Dichotomize Three (ID3) classification methods (ID3) is a learning system algorithm that is often used by the developer to create an artificial intelligence system or expert systems in solving problems with single alternative/ fixed alternative output and not the best alternative to the lowest sort.

Material and Methods
Decision Support System for determining the contact lens for refractive errors is developed by following all phases of Software Development Life Cycle as shown in Figure 1. Iterative Dichotomize Three (ID3) classification method will generate entropy and gain values of attributes that has been collected from the UCI Learning Repository dataset and data experts of Salwi Farma Optical as shown in Table 1. The Attributes that include sample data, age of the patient, astigmatic, vision prescription, the ratio of tear production, and classes will affect the outcome of the decision tree to determine the right contact lens for refractive errors patients. The steps to create a decision tree using ID3 algorithm based are count the number of cases in each attribute classy hard lenses, soft contact lenses or not recommended to use contact lenses; determining the entropy value of each class by equation (1) and the gain value by equation (2). The calculation of the gain is repeated on each attribute and the largest gain value will be selected as the root in decision tree. The next step is making the decision tree. Do the repetitive calculation for determining the entropy value of each class by equation (1) and the gain value by equation (2) until all the attributes to be a node in the decision tree.  (2) Astigmatic is an eye condition with blurred vision as its main symptom. The front surface of the eye (cornea) of a person with astigmatism is not curved properly -the curve is irregularusually one half is flatter than the other -sometimes one area is steeper than it should be. Tear production rate Reduced (1), Normally (2) a. Reduced: eyes look soft and damp budge b. Normally: eyes look bright without water and not excessive.
The programming languages used to build decision support systems are PHP for DSS application interface and XAMPP MySql for database.

Result & Discussion
Based on 30 pieces of training sample data is obtained the number of classes of hard lens = 3 pieces, soft lens = 5 pieces, and not recommended to use a contact lenses = 16 pcs, the entropy value of each class: ൬ The result of the calculation of entropy and gain values shown in Table 1. Based on Table 1, astigmatic is the attribute with the largest gain value and will be selected as the root in decision tree. The result of the repetitive calculation of entropy and gain values shown in Table 2.
After designing the model base of ID3 algorithm, DSS interfaces , databases , and architectural, then the next stage is converting the result of design to coding, where one interface results is shown in Figure 3. The next step is to make a node to generate a decision tree as shown in Figure 2.

. Final Results Decision Trees
System testing is performed to determine whether the application meets the expected needs and in accordance with its designs. Test using the confusion matrix as shown in Table 3.

Conclusion
The eye specialist test result for the training data obtained the accuracy rate of 96.7% and an error rate of 3.3%, the result test using confusion matrix obtained the accuracy rate of 96.1% and an error rate of 3.1%; for the data testing obtained accuracy rate of 100% and an error rate of 0.