Artificial Intelligence-Based System for Retinal Disease Diagnosis

: The growth in the number of people suffering from eye diseases determines the relevance of research in the field of diagnosing retinal pathologies. Artificial intelligence models and algorithms based on measurements obtained via electrophysiological methods can significantly improve and speed up the analysis of results and diagnostics. We propose an approach to designing an artificial intelligent diagnosis system (AI diagnosis system) which includes an electrophysiological complex to collect objective information and an intelligent decision support system to justify the diagnosis. The task of diagnosing retinal diseases based on a set of heterogeneous data is considered as a multi-class classification on unbalanced data. The decision support system includes two classifiers— one classifier is based on a fuzzy model and a fuzzy rule base (RB-classifier) and one uses the stochastic gradient boosting algorithm (SGB-classifier). The efficiency of algorithms in a multi-class classification on unbalanced data is assessed based on two indicators—MAUC (multi-class area under curve) and MMCC (multi-class Matthews correlation coefficient). Combining two algorithms in a decision support system provides more accurate and reliable pathology identification. The accuracy of diagnostics using the proposed AI diagnosis system is 5–8% higher than the accuracy of a system using only diagnostics based on electrophysical indicators. The AI diagnosis system differs from other systems of this class in that it is based on the processing of objective electrophysiological data and socio-demographic data about patients, as well as subjective information from the anamnesis, which ensures increased efficiency of medical decision-making. The system is tested using actual data about retinal diseases from the Russian Institute of Eye Diseases and its high efficiency is proven. Simulation experiments conducted in various scenario conditions with different combinations of factors ensured the identification of the main determinants (markers) for each diagnosis of retinal pathology.


Introduction
Preservation of human visual functions is a pressing issue for the medical community.Deterioration or loss of visual function has serious consequences not only for humans as individuals, but also as productive resources of the economy.The retina is the inner shell of the eye, consisting of many layers.The main ones are the pigment epithelium and light-sensitive cells responsible for converting light signals, which are then transmitted to the brain.As a result, a person receives a clear image of the environment in all its color diversity.The occurrence of pathological processes in various areas (periphery, central part) provokes deterioration in the acuity and quality of vision, as a result of which surrounding objects begin to be perceived as distorted, faded and unnatural.Untimely diagnosis and treatment of retinal pathologies are fraught with irreversible consequences, up to and including complete loss of vision.
According to WHO estimates [1], by 2050 there will be more than 244 million people in the world aged over 65 years, which is 14.9% of the world's population, with retinal diseases such as diabetic retinopathy and age-related macular degeneration.Global estimates of the number of people with eye diseases [1] that can lead to visual impairment show how common such diseases are.At least 2.2 billion people worldwide live with some form of visual impairment or blindness.This figure includes people with vision impairment due to presbyopia (1.8 billion people, including people with corrected and uncorrected presbyopia), moderate to severe distance vision impairment or blindness due to uncorrected refractive errors (123.7 million people, such as myopia or hyperopia), cataracts (65.2 million), age-related macular degeneration (10.4 million), glaucoma (6.9 million), corneal opacity (4.2 million), diabetic retinopathy (3 million), trachoma (2 million) and other conditions (37.1 million) (Figure 1).
According to WHO estimates [1], by 2050 there will be more than 244 million people in the world aged over 65 years, which is 14.9% of the world's population, with retinal diseases such as diabetic retinopathy and age-related macular degeneration.Global estimates of the number of people with eye diseases [1] that can lead to visual impairment show how common such diseases are.At least 2.2 billion people worldwide live with some form of visual impairment or blindness.This figure includes people with vision impairment due to presbyopia (1.8 billion people, including people with corrected and uncorrected presbyopia), moderate to severe distance vision impairment or blindness due to uncorrected refractive errors (123.7 million people, such as myopia or hyperopia), cataracts (65.2 million), age-related macular degeneration (10.4 million), glaucoma (6.9 million), corneal opacity (4.2 million), diabetic retinopathy (3 million), trachoma (2 million) and other conditions (37.1 million) (Figure 1).

Figure 1.
Structure of eye diseases in the world that can cause visual impairment as of 2020 year (compiled according to [1]).
Detection of retinal pathologies at early stages using advanced non-invasive diagnostic methods can significantly reduce the duration of treatment, speed up the recovery process and help a person return to active work.Currently, the following methods are most commonly used to diagnose retinal pathologies: 1. Ophthalmoscopy is a procedure for examining the fundus of the eye, to assess the retina condition, optic nerve head and blood vessels of the eye using special equipment.2. Optical coherence tomography (OCT) is a diagnostic method that has high resolution and provides highly detailed images of the fundus.3. Electrophysiological diagnostic methods are methods based on recording bioelectrical activity, allowing analysis of the retina functional state based on electrical signals generated by retinal cells.
All of these methods are among the most accurate and practically significant research methods, but they can be time-consuming and error-prone.Given the high need of ophthalmologists for fast and accurate diagnostics to make decisions about the treatment and prevention of diseases, interest in research in the field of artificial intelligence methods in ophthalmology has increased.Artificial intelligence (AI) technologies-machine learning, analytics of big data and generative neural networks-are actively being implemented to diagnose pathologies such as diabetic retinopathy, diabetic macular edema, age-related macular degeneration and others [2][3][4][5].Structure of eye diseases in the world that can cause visual impairment as of 2020 year (compiled according to [1]).
Detection of retinal pathologies at early stages using advanced non-invasive diagnostic methods can significantly reduce the duration of treatment, speed up the recovery process and help a person return to active work.Currently, the following methods are most commonly used to diagnose retinal pathologies: 1.
Ophthalmoscopy is a procedure for examining the fundus of the eye, to assess the retina condition, optic nerve head and blood vessels of the eye using special equipment.2.
Optical coherence tomography (OCT) is a diagnostic method that has high resolution and provides highly detailed images of the fundus.

3.
Electrophysiological diagnostic methods are methods based on recording bioelectrical activity, allowing analysis of the retina functional state based on electrical signals generated by retinal cells.
All of these methods are among the most accurate and practically significant research methods, but they can be time-consuming and error-prone.Given the high need of ophthalmologists for fast and accurate diagnostics to make decisions about the treatment and prevention of diseases, interest in research in the field of artificial intelligence methods in ophthalmology has increased.Artificial intelligence (AI) technologies-machine learning, analytics of big data and generative neural networks-are actively being implemented to diagnose pathologies such as diabetic retinopathy, diabetic macular edema, age-related macular degeneration and others [2][3][4][5].
A promising direction in this area is a method for analyzing medical images obtained using OCT or OCT angiography [6,7].The artificial intelligence program must be trained on a large array of data, including images of the fundus [8,9].An example of research in the field of diagnostics of retinal pathologies using artificial intelligence methods is a program to evaluate the structure of the fundus and conduct dynamic observation of the studied structure based on archival material of fundus photographs [10].
Diagnostics of diabetic retinopathy based on a Web service using machine learning methods is proposed in [11][12][13].The neural network is also trained on fundus images.From a medical point of view, OCT may not be effective enough due to concomitant eye pathologies, including vitreous pathologies, which may interfere with the study using the OCT method.From the point of view of implementing the technology, certain difficulties also arise, which are pointed out by the authors of the study [14]: creating a database for training artificial intelligence, collecting the required amount of data for training AI, «black box» problems and difficulties in communication between technical specialists implementing artificial intelligence and medical staff.
Decision support systems improves the quality of medical diagnostics and treatment.Algorithms and knowledge bases ensure data analysis, accurate diagnosis and development of effective treatment recommendations.They make it easier for doctors to make informed decisions based on clinical data and scientific research, which leads to increased treatment efficiency.The study [15] proposes the development of an automated decision support system for an ophthalmologist to solve problems of morphological description of the state of the optic nerve head in norm and pathology.Electrophysiological methods for diagnosing retinal pathologies, which are free from the disadvantages of the OCT method and can be used in conjunction with AI, remain no less informative.The work [16] presents a decision support algorithm for diagnosing retinal dystrophy based on the analysis of electroretinogram signals using machine learning methods.The described algorithm analyzes the parameters obtained from the wavelet scalogram of the electroretinogram signal and classifies them into «healthy» and «sick».
A prototype of an intelligent (expert) decision support system based on expert knowledge is created to help doctors analyze and diagnose retinal diseases early [17,18].For intelligent data analysis and diagnostics, the authors use convolutional deep learning artificial neural networks and cognitive graphics and fuzzy logic methods for figurative representation of retinal pathologies in various diseases and representation of expert knowledge.The electroretinograms and statistical data on patients (gender, age, etc.) as initial data are included.The complexity of the proposed expert system is in the development of a biophysical research results database and storing of patient clinical data and medical examination results.An advantage of this work is using additional information to research data, for example, measurements from other devices.
A system for diagnosing retinal pathologies based on fuzzy logic methods is described in [19][20][21][22], which identifies up to nine different diagnoses.The input data for this system were electroretinogram data and a dynamic model of the retina.This work demonstrates the success of using such systems to diagnose retinal pathologies, but does not take into account the patient's medical history and socio-demographic data.
The fuzzy logic method allows the ambiguity and uncertainty in data and knowledge that may arise when solving medical problems to be taken into account.This is especially important in cases where symptoms or diagnosis are not clear and ambiguous and decisions must be made under uncertainty.The fuzzy logic method also allows medical experience and expert opinion to be included in making decisions.This is especially useful in medicine, where it is often necessary to combine data from different sources and consider many factors in diagnosis or prescribing treatment.
The tuning of the parameters of the fuzzy model can be implemented based on various algorithms, based on the new algorithms moth-flame optimizer (MFO) [23,24], generalized opposition moth flame optimization (GCMFO) [25] and chaos simulated annealing multi-universe optimization (CSAMVO) [26].A series of various optimization algorithms can be useful for improving the tuning of parameters in fuzzy logic controllers.These algorithms can be successfully used in medical diagnostic applications when multimodal data containing many images are processed and can improve the accuracy of diagnosis.
The purpose of the study is to develop an approach to design an artificial intelligent diagnosis system (AI diagnosis system) for retinal pathology that includes an electrophysiological complex and a decision support system.An AI diagnosis system should provide diagnostics of possible retinal pathology based on multidimensional indicators, which are quantitative indicators of the electroretinogram results, qualitative indicators contained in the anamnesis and additional socio-demographic factors.To achieve this purpose, the following specific problems are solved: development of an approach to design a comprehensive AI diagnosis system (Section 2.1), identification and justification of indicators affecting retinal pathology diagnostics quality (Section 2.2), development of a fuzzy model for retinal pathology diagnostics as part of a decision support system and rule-based classifier (Section 2.3), SGB-classification in decision making (Section 2.4), testing of the developed AI diagnosis system based on multivariate situational experiments (Section 3) and identification of factors-markers for the disease development via all retinal pathology forms (Section 4).

Description of the Proposed Approach
We propose an approach to design an artificial intelligent diagnosis system (AI diagnosis system) which includes an electrophysiological complex and an intelligent decision support system.It could increase retinal disease diagnosis accuracy by using a decision support system based on a fuzzy model and classification algorithm (Figure 2).can be useful for improving the tuning of parameters in fuzzy logic controllers.These algorithms can be successfully used in medical diagnostic applications when multimodal data containing many images are processed and can improve the accuracy of diagnosis.
The purpose of the study is to develop an approach to design an artificial intelligent diagnosis system (AI diagnosis system) for retinal pathology that includes an electrophysiological complex and a decision support system.An AI diagnosis system should provide diagnostics of possible retinal pathology based on multidimensional indicators, which are quantitative indicators of the electroretinogram results, qualitative indicators contained in the anamnesis and additional socio-demographic factors.To achieve this purpose, the following specific problems are solved: development of an approach to design a comprehensive AI diagnosis system (Section 2.1), identification and justification of indicators affecting retinal pathology diagnostics quality (Section 2.2), development of a fuzzy model for retinal pathology diagnostics as part of a decision support system and rule-based classifier (Section 2.3), SGB-classification in decision making (Section 2.4), testing of the developed AI diagnosis system based on multivariate situational experiments (Section 3) and identification of factors-markers for the disease development via all retinal pathology forms (Section 4).

Description of the Proposed Approach
We propose an approach to design an artificial intelligent diagnosis system (AI diagnosis system) which includes an electrophysiological complex and an intelligent decision support system.It could increase retinal disease diagnosis accuracy by using a decision support system based on a fuzzy model and classification algorithm (Figure 2).The intelligent decision support system complements the electrophysiological complex, which is designed to conduct electroretinography and other electrophysiological studies of the retina.Data recorded from the sensors are processed and recorded in a memory device for subsequent diagnosis using the decision support system.In addition to electroretinogram data, the system allows additional data about the patient to be entered, including age, gender, symptoms and other factors that will be used by the system to form a diagnosis.This approach allows, in addition to objective information obtained on the basis of measurements, additional information from the patient's anamnesis, his The intelligent decision support system complements the electrophysiological complex, which is designed to conduct electroretinography and other electrophysiological studies of the retina.Data recorded from the sensors are processed and recorded in a memory device for subsequent diagnosis using the decision support system.In addition to electroretinogram data, the system allows additional data about the patient to be entered, including age, gender, symptoms and other factors that will be used by the system to form a diagnosis.This approach allows, in addition to objective information obtained on the basis of measurements, additional information from the patient's anamnesis, his medical history and socio-demographic data to be used.A comprehensive analysis of such information would ensure an increase in the diagnosis accuracy or help predictively, based on specific markers, the patient prevent the actual onset of a particular disease.This approach can be compared with the construction of a digital twin, well studied for modeling organizational and technical systems [27][28][29][30][31].
The AI diagnosis system operates as presented in Figure 3.
medical history and socio-demographic data to be used.A comprehensive analysis of such information would ensure an increase in the diagnosis accuracy or help predictively, based on specific markers, the patient prevent the actual onset of a particular disease.This approach can be compared with the construction of a digital twin, well studied for modeling organizational and technical systems [27][28][29][30][31].The AI diagnosis system operates as presented in Figure 3.A functional model based on the IDEF0 methodology describes in detail the operation of the entire diagnosis system.The diagram includes the following main functions: (1) selection of the research method (maximum ERG, rod ERG, etc.), (2) preparation of the research subject in accordance with the method (application of sensors, checking the impedance between the biological tissue and sensors), (3) setting the necessary research parameters (duration, stimulation parameters), ( 4) starting analog signal processing, (5) starting digital signal processing, ( 6) entering additional parameters (data about the patient in accordance with the research methodology), ( 7) launching the decision support system; (8) decision making-diagnosis.
Algorithm 1 is the technique for the diagnosis whereby rules are established for examining a patient and doctor's cooperation with the decision support system.

Algorithm 1. Substantiating diagnosis technique for the decision making person (doctor)
1. Select the research method 2. Prepare the patient in accordance with the method 3. Ensure a free and relaxed position of the patient 4. Administer anesthesia (if necessary) 5. Perform light or dark adaptation (in accordance with the method) 6. Fill out the patient's card in the system A functional model based on the IDEF0 methodology describes in detail the operation of the entire diagnosis system.The diagram includes the following main functions: (1) selection of the research method (maximum ERG, rod ERG, etc.), (2) preparation of the research subject in accordance with the method (application of sensors, checking the impedance between the biological tissue and sensors), (3) setting the necessary research parameters (duration, stimulation parameters), ( 4) starting analog signal processing, (5) starting digital signal processing, ( 6) entering additional parameters (data about the patient in accordance with the research methodology), ( 7) launching the decision support system; (8) decision making-diagnosis.
Algorithm 1 is the technique for the diagnosis whereby rules are established for examining a patient and doctor's cooperation with the decision support system.Select the research method 2.
Prepare the patient in accordance with the method 3.
Ensure a free and relaxed position of the patient 4.
Perform light or dark adaptation (in accordance with the method) 6.
Fill out the patient's card in the system 7.
Switch the device to the impedance measurement mode 8.
Select electrodes in accordance with the method 9.
Install the electrodes on the object of research 10.Monitor the impedance of the installed electrodes 11.Set the necessary research parameters 12. Start analog signal processing 13.Start digital signal processing 14.Enter additional information about the patient into the system 15.Start the decision support system and obtain the results 16.Make the final diagnosis

Description of the Decision Support System
Cause-and-effect relationships between different types of patient data and retinal pathologies using the Ishikawa diagram is to identify significant factors and their interrelations for their further consideration in the decision support system (Figure 4).The main factors predisposing or indicating retinal pathology can be divided into the following three groups: 1.
Social and demographic data that affect a person's predisposition to a particular pathology.Such data include age and gender.

2.
Anamnesis.The patient's complaints can indicate symptoms characteristic of a particular pathology, for example, complaints of difficulty reading and deterioration of visual acuity.

3.
Data measured during an electrophysiological study.It helps to determine the location, nature, and degree of impairment of the functional state of the retina.
Cause-and-effect relationships between different types of patient data and retinal pathologies using the Ishikawa diagram is to identify significant factors and their interrelations for their further consideration in the decision support system (Figure 4).The main factors predisposing or indicating retinal pathology can be divided into the following three groups: 4. Social and demographic data that affect a person's predisposition to a particular pathology.Such data include age and gender.5. Anamnesis.The patient's complaints can indicate symptoms characteristic of a particular pathology, for example, complaints of difficulty reading and deterioration of visual acuity.6.Data measured during an electrophysiological study.It helps to determine the location, nature, and degree of impairment of the functional state of the retina.The diagram reflects groups of these factors in the form of problems that, acting separately or together, can affect the detection of retinal pathology.The choice of factors is based on data from the national ophthalmology guidelines [32], as well as studies on the problems of diagnosing retinal diseases [33][34][35].The diagram reflects groups of these factors in the form of problems that, acting separately or together, can affect the detection of retinal pathology.The choice of factors is based on data from the national ophthalmology guidelines [32], as well as studies on the problems of diagnosing retinal diseases [33][34][35].

Fuzzy Model and Rule-Based Decision Making
Mathematical modeling based on the fuzzy logic method is to solve the problem of diagnosing retinal pathologies.The mathematical theory of fuzzy sets and fuzzy logic is a generalization of classical set theory and formal logic.The initial data obtained in the traditional way (expert assessments) are converted into the values of linguistic variables (fuzzification).Then, fuzzy inference procedures are implemented on a set of production rules that make up the knowledge base of the control system, resulting in the formation of output linguistic values that are converted into the exact values of the calculation results (defuzzification).
The implementation of the fuzzy modeling process is carried out using the specialized Fuzzy Logic Toolbox package of the MATLAB R2021b software.Fuzzy inference is implemented based on the Mamdani algorithm.To solve the problem of making decisions on diagnostics of retinal pathologies using the fuzzy logic method, its qualitative description is required based on linguistic expressions (logical rules).It is necessary to enter input and output variables.In relation to the problem being solved, it is necessary to enter 43 linguistic variables into the rule base, which are divided into three types in accordance with the classification given above: socio-demographic data (I1, I2), data obtained from the anamnesis, including subjective (I3-I15) and data obtained by recording bio-electrical signals, objective (I16-I39).There are four output variables-these are diagnoses and their stages (O1-O4).Linguistic variables and the range of their values are shown in Table 1.The structure of the fuzzy model structure with input variables I1. ..I39 and output variables O1. ..O4 is shown in Figure 5.The structure of the fuzzy model structure with input variables I1…I39 and output variables O1…O4 is shown in Figure 5. Membership functions specified for some variable are presented in Figure 6.Membership functions specified for some variable are presented in Figure 6.The decision-making rule base for retinal pathology diagnostics is defined as what-if production rules.Some rules from more than 150 are presented below.

•
If (I5 is normal) and is no) and (I14 is no) and (I32 is normal) and (I33 is normal), then (O4 is no pathology).
Fuzzy inference is formed according to all the rules using the max-disjunction operation.The defuzzification procedure uses the gravity method.

SGB-Classification in Decision Making
The problem of retinal diseases diagnosis using a set of factors can also be considered as a multi-class classification problem on imbalanced data.To solve it, taking into account the given four diagnoses-classes-, it is necessary to classify the patient into four classes.Each class corresponds to one of the four listed diseases.We select methods and determine their comparative efficiency for the classification.The classification model must be robust for input data noise and give highly accurate results.
Classification of imbalanced datasets is a relatively new area of research in machine learning that takes into account skewed distributions of sample data.A dataset is imbalanced if one class contains more objects than other classes [36].Most standard machine learning algorithms show poor performance on such datasets because they favor classes with a large number of objects during classification, which results in poor prediction accuracy compared to classes containing a small number of objects [37].Therefore, it is difficult to learn rare but important instances of classes.In practice, when estimating classification error, the same loss cost (loss function) is assumed for all objects from any class.
We consider the following types of classifiers: metric, linear and boosting.Metric classifiers are easy to use; they use analysis of the objects' similarities in the sample with training methods, but they are not flexible and they are unstable to data noise and outliers in the initial data.Linear classifiers are flexible algorithms, but they are limited in that they assign objects to one of two classes; that is, they are used for binary classification.For the problem being solved, this classifier is not suitable.The third type of classifiersboosting-allows weak classifiers to be combined into one strong one, and on the basis of this combination, the shortcomings of each algorithm to be eliminated.
The use of a metric classifier based on the KNN (k-nearest neighbor) algorithm and boosting based on the SGB (stochastic gradient boosting) algorithm for the problem of retinal diseases diagnosis showed the following accuracy results.The classification quality assessment is estimated by the number of correct predictions-the diagnosis of the patient in the test sample (75% of patient data is used as a training sample and 25% as a test sample).Thus, in the KNN-based model, 84.7% of correct assignments of two clusters were obtained, and in the SGB-based model, 95.1% of correct predictions were obtained.
Boosting is one of the most powerful recognition algorithms.This is for the adaptive technique of composition construction [38,39].Taking into account the features of the problem being solved, it is possible to select a set of basic algorithms and a loss function [40,41], which is to focus on the processed data features.We propose to use SGB; these are algorithms that represent boosting as a gradient descent process.The algorithm is based on a sequential refinement of a function, which is a linear combination of basic classifiers in order to minimize the loss function.The classification model based on the stochastic gradient boosting algorithm was presented and described in detail in the author's previous work [42].

Multi-Class Performance Metrics for Classification Algorithms
To evaluate the quality of the used classification algorithms-the rule based (RB) classifier and the SGB classifier-, we use an extension of the AUC-based metric for multiclass problems, MAUC (multi-class area under curve) [43], which averages the AUC value of all pairs of classes and can be used in studies of multi-class imbalanced data learning.The metric is defined as: where C is the number of classes, is the AUC value between class i and class j.
The ROC curve shows all possible conflicts between the true positive rate (TPR) and the false positive rate (FPR) at different decision thresholds, and the AUC evaluation metric transforms this curve into a value in the range [0.5;1],where a value of 1 indicates a perfect classifier and a lower value of 0.5 means that the classifier does not perform better than random guessing.
The Matthews correlation coefficient (MCC) is a common performance evaluation metric for boosting algorithms, which is more commonly used in biomedical imbalanced data mining studies [44].The MCC inputs all class values into a confusion matrix to calculate a measure of the correlation between the actual and predicted values.The MCC value is between −1 and +1.A value of +1 indicates a perfect prediction, while a value of −1 indicates a reverse prediction.This metric can be directly calculated from the confusion matrix: .
MCC is a metric for assessing the quality of binary classification, and it has been shown that the behavior of MCC remains unchanged in multi-class algorithms [45].Based on this, the MCC metric can be extended to multi-class algorithms-MMCC (multi-class Matthews correlation coefficient)-using a decomposition strategy.The calculation of MMCC is based on averaging the MCC values of all pairs of classes:

RB-Classifier Testing
The system is tested using actual data on retinal diseases from the Russian Institute of Eye Diseases.The original data set includes information about all described factors for 101 patients and their diagnoses.
The fuzzy rule base is designed on an analysis of specialized literature and studies proving the dependence of detection of a specific pathology on deviation of certain ERG parameters from the normal value.In addition to the ERG parameters, the patient's symptoms and subjective sensations were selected, as well as their social and demographic factors, which can predetermine (stimulate) the appearance of a particular pathology.Each rule contains no more than five input variables, which include variables from at least two groups, since a diagnosis based only on socio-demographic, subjective and/or objective electrophysiological data will not reflect a reliable diagnosis.The combination of variables is selected so that the rule contains the most significant ERG indicators for diagnosing a specific pathology, as well as one or two factors from the first two groups, which are predetermining for certain pathology or are the most common symptoms.
Different combinations of factors can generate different diagnoses.To study such multivariant combinations of factors that influence the confirmation or refutation of a particular diagnosis, we conduct a situational analysis.Simulation experiments are implemented in various situations close to real practice and requiring a decision on the diagnosis of retinal pathology.Multivariant situations with a different set of combinations of input factors of seven types are considered.
Such a set of values of variables entered into the fuzzy model provides generation of diagnosis O1 "proliferative diabetic retinopathy".It should be noted that the study [28] confirms the significance of deviations from the norm of the results of multifocal ERG, ERG pattern, as well as maximum ERG for the diagnosis of diabetic retinopathy, which confirms the modeling results.
With this set of input variables, the model forms the diagnosis O1 "non-proliferative diabetic retinopathy".In this group of situations and experiments, the main determinants that form this diagnosis are diabetes mellitus and its duration, since it is mandatory and predetermines the conditions for the occurrence of diabetic retinopathy.
The third group of situations determined the set of values of the input variables I1, I3, I16, I23, I26 and I28: • I1 (age)-"61-80"; I3 (diabetes mellitus)-"not diagnosed"; With this set of input variables, the result of the simulation modeling is the diagnoses O2 "wet age-related macular degeneration", the key influencing factors of which are age and the results of local and multifocal ERG, and O1 "non-proliferative diabetic retinopathy", the occurrence of which in this experiment was influenced by such a key factor as the presence of type 2 diabetes mellitus.
The sixth group.Here the values of the input variables I1, I3, I7, I14, I16, I19, I20, I26, I34, I36 and I37 are varied from the following ranges: • I1 (age)-"41-60"; I3 (diabetes)-"1"; The results of the simulation modeling are the diagnoses O1 "non-proliferative diabetic retinopathy", O2 "age-related macular degeneration of the dry form" and O3 "hereditary retinoschisis (X-chromosomal)".The result O1 "non-proliferative diabetic retinopathy" was determined by such factors as the presence of type 1 diabetes mellitus, reduced or undetectable amplitude of the b-wave ERG, as well as reduced oscillatory potentials, which is confirmed by the study [33].The result O2 "age-related macular degeneration dry form" is influenced by age, the subjective indicator "difficulty in reading", as well as objective indicators of multifocal ERG and local ERG.The result O3 "hereditary retinoschisis (Xchromosomal))" was influenced by the hereditary factor, since this disease is inherited, as well as objective indicators, such as the amplitude of the a-wave of the cone ERG and the amplitude of the b-wave of the maximum ERG.Studies confirming the results of simulation modeling are described in [34].
The seventh group.In situations of this type, the values of the input variables I3, I4, I16, I18, I26, I33, I36 are changed from the following ranges: As a modeling result in this group of situations, diagnoses O1 "non-proliferative diabetic retinopathy", O2 "age-related macular degeneration of the dry form" and O4 "secondary retinal detachment" are formed.The result O1 "non-proliferative diabetic retinopathy" was influenced by such factors as the presence of type 2 diabetes mellitus, the duration of diabetes mellitus, a reduced amplitude of the b-wave ERG, as well as reduced amplitudes of the components of multifocal ERG, which is confirmed by the study [35].The result O2 "age-related macular degeneration of the dry form" is influenced by objective indicators of multifocal ERG.The result of O4 "secondary retinal detachment" is influenced by such factors as the presence of diabetes mellitus, since secondary detachment can be a consequence of diabetic retinopathy [36], the amplitude of the b-wave and a-wave of the maximum ERG, as well as the lability of the optic nerve, which is confirmed in the study [37].

Efficiency Results of RB and SGB Classifiers
We test two classifiers, considering them as competitors.It is required to evaluate their comparative efficiency for further selection of one of them.Performance evaluation is implemented based on two metrics-MAUC and MMCC.The results of Table 2 show that the SGB algorithm has a higher value of the average MAUC and MMCC, which means its higher efficiency, but for convincingness we will conduct additional statistical tests.For a more rigorous comparison of the differences between the classification algorithms, a set of statistical tests are performed on the experimental results to further validate their results and determine whether there is a significant difference between them.The analysis is performed using a parametric test-an independent two-sample Student's t-test for independent samples-and a non-parametric Wilcoxon test.Although parametric tests are more reliable than non-parametric ones, they are based on strict assumptions that are often violated in machine learning studies and make their results unreliable.Therefore, non-parametric tests are preferable for comparing the results of classifiers.
Statistical analysis, Table 3, showed that the means (averages) for both MAUC and MMCC differ insignificantly and the null hypothesis of equality of means cannot be rejected, with the exception of comparing the mean values of the MMCC metrics of the compared classifiers using the Wilcoxon test at a significance level of 0.05.This suggests that in a number of situations, the SGB algorithm for diagnosing retinal diseases provides higher efficiency.Thus, the statistical tests for a significant difference between the mean values of the samples of the MAUC and MMCC metrics for the RB and SGB algorithms do not confirm their absolute effectiveness.Therefore, it is proposed to use both algorithms in combination when diagnosing retinal diseases, obtaining a diagnosis based on both classifiers.The system has two modes for setting up algorithms.The first mode is sequential-each classifier forms a diagnosis (both first and second opinion), which must then be approved by a doctor.The second mode is parallel-a weighted assessment of the diagnoses made by both algorithms is performed, in which the SGB algorithm has a probability of 0.65 and the RB algorithm 0.35.
In continuation of research in this direction, a more detailed analysis of the data can be carried out to study the variation of the factors' (predictors) values in groups.It can be hypothetically assumed that the classifier based on the RB algorithm more accurately identifies the diagnosis in samples with higher variability of predictor values, while the classifier based on the SGB algorithm better diagnoses diseases with lower variations of predictors.

Discussion of Results
We conduct more than 100 experiments with different combinations and values of input variables.The experiments' results help to identify the key determinants and factors (markers) for each disease.Surface plots for each of the four diagnoses are shown in Figure 7.In the presence of one or another input variable, the diagnosis (O1. ..O4) will be established with a higher probability; that is, these input variables act as certain markers of one or another diagnosis.
samples of the MAUC and MMCC metrics for the RB and SGB algorithms do not confirm their absolute effectiveness.Therefore, it is proposed to use both algorithms in combination when diagnosing retinal diseases, obtaining a diagnosis based on both classifiers.The system has two modes for setting up algorithms.The first mode is sequential-each classifier forms a diagnosis (both first and second opinion), which must then be approved by a doctor.The second mode is parallel-a weighted assessment of the diagnoses made by both algorithms is performed, in which the SGB algorithm has a probability of 0.65 and the RB algorithm 0.35.
In continuation of research in this direction, a more detailed analysis of the data can be carried out to study the variation of the factors' (predictors) values in groups.It can be hypothetically assumed that the classifier based on the RB algorithm more accurately identifies the diagnosis in samples with higher variability of predictor values, while the classifier based on the SGB algorithm better diagnoses diseases with lower variations of predictors.

Discussion of Results
We conduct more than 100 experiments with different combinations and values of input variables.The experiments' results help to identify the key determinants and factors (markers) for each disease.Surface plots for each of the four diagnoses are shown in Figure 7.In the presence of one or another input variable, the diagnosis (O1…O4) will be established with a higher probability; that is, these input variables act as certain markers of one or another diagnosis.Based on the correlation matrix obtained as a result of testing the model for more than 100 different situations, it was found that the input variables I7, I8, I10, I16, I17, I18, I19, I21, I23, I27, I28, I31, I32, I33, I35, I36, I37, I38 and I39 have medium correlation with the output variables O1, O2, O3 and O4 (correlation coefficient r from 0.4 to 0.67), and the input variable I24 has a high correlation with O2 (correlation coefficient r more than 0.68).Correlation matrix is shown in Figure 8.Based on the correlation matrix obtained as a result of testing the model for more than 100 different situations, it was found that the input variables I7, I8, I10, I16, I17, I18, I19, I21, I23, I27, I28, I31, I32, I33, I35, I36, I37, I38 and I39 have medium correlation with the output variables O1, O2, O3 and O4 (correlation coefficient r from 0.4 to 0.67), and the input variable I24 has a high correlation with O2 (correlation coefficient r more than 0.68).Correlation matrix is shown in Figure 8.
Based on a detailed analysis of the correlation matrix, it was found that the diagnosis O1 is established for the variables I16 (r = −0.47),I19 (r = −0.59)and I35 (r = −0.46).Consequently, the presence or absence of diabetic retinopathy is determined by the amplitude of the b-wave of the maximum ERG, the peak latency of the a-wave of the maximum ERG and the threshold of electrical sensitivity.
Based on the results of statistical analysis, a color scheme for the distribution of factors from more significant (highlighted in bright red) to less significant (highlighted in pale yellow) is developed (Figure 9).The scheme summarizes the processed data and is a doctor's guide for the final justification and diagnosis.

Conclusions
Today the problem of ophthalmological diseases, in particular retinal diseases, remains relevant and significant.New solutions for the diagnosis of retinal pathologies are required; it would detect the disease at an early stage and increase the diagnosis efficiency and accuracy.This opens up new prospects for the development of innovative approaches to the treatment of retinal pathologies and contributes to a significant reduction in the incidence of blindness and disability due to eye diseases.
To increase the accuracy and speed of retinal pathology diagnosis, the paper proposes an approach for diagnosing retinal pathologies based on an electrophysiological complex and AI decision support system.A decision support system based on artificial intelligence methods can not only improve the quality of medical diagnostics, but also predict the disease courses.This system facilitates data analysis, accurate diagnoses and the development of effective treatment recommendations.It makes it easier for doctors to make informed decisions based on clinical data and scientific research, which ultimately leads to higher treatment efficiency.
In this study, we have presented a thorough systems analysis of existing methods, models and technologies for diagnosing eye diseases.An intelligent system has been developed that includes an electrophysiological complex for hardware diagnostics and an intelligent decision support system based on a fuzzy model.A functional diagram of the The scheme summarizes the processed data and is a doctor's guide for the final justification and diagnosis.

Conclusions
Today the problem of ophthalmological diseases, in particular retinal diseases, remains relevant and significant.New solutions for the diagnosis of retinal pathologies are required; it would detect the disease at an early stage and increase the diagnosis efficiency and accuracy.This opens up new prospects for the development of innovative approaches to the treatment of retinal pathologies and contributes to a significant reduction in the incidence of blindness and disability due to eye diseases.
To increase the accuracy and speed of retinal pathology diagnosis, the paper proposes an approach for diagnosing retinal pathologies based on an electrophysiological complex and AI decision support system.A decision support system based on artificial intelligence methods can not only improve the quality of medical diagnostics, but also predict the disease courses.This system facilitates data analysis, accurate diagnoses and the development of effective treatment recommendations.It makes it easier for doctors to make informed decisions based on clinical data and scientific research, which ultimately leads to higher treatment efficiency.
In this study, we have presented a thorough systems analysis of existing methods, models and technologies for diagnosing eye diseases.An intelligent system has been developed that includes an electrophysiological complex for hardware diagnostics and an intelligent decision support system based on a fuzzy model.A functional diagram of the operation of the electrophysiological complex as part of an intelligent system has been developed, which has defined an algorithm for diagnosing retinal disease for a doctor.
A system of key factors has been constructed that directly or indirectly affects the occurrence of retinal pathologies.These are three groups of factors-measurement data, anamnesis data and socio demographic data.These factors formed the basis of a fuzzy model and the formation of a rule base.The fuzzy model as a component of an AI decision support system provides support for decision making on diagnostics and differs from the existing ones by taking into account both objective factors-data obtained from the electrophysiological complex and socio demographic factors about the patient-and subjective factors-patient history data (anamnesis).
The problem of retinal disease diagnostics based on a set of heterogeneous data is considered as a multi-class classification on unbalanced data.The decision support system includes two classifiers-one classifier based on a fuzzy model and a fuzzy rule base (RBclassifier) and one using the stochastic gradient boosting algorithm (SGB-classifier).The efficiency of the algorithms in multi-class classification on unbalanced data is estimated based on two indicators-MAUC and MMCC.Combining these two algorithms in the decision support system provides more accurate and reliable pathology identification.
A series of scenario experiments with various combinations of input factors have been conducted; the results of statistical analysis identify the main determinants (markers) for each diagnosis.The developed model as part of the electrophysiological complex, which provides the doctor with decision support in retinal diseases diagnosis, has practical significance.The proposed approach is universal and can be used not only in ophthalmology, but also in neurology, cardiology and other areas where diagnostic methods are present that record tissue bioelectric activity.

Figure 1 .
Figure1.Structure of eye diseases in the world that can cause visual impairment as of 2020 year (compiled according to[1]).

Figure 2 .
Figure 2. Conceptual scheme of the approach for design of the AI diagnosis system.

Figure 2 .
Figure 2. Conceptual scheme of the approach for design of the AI diagnosis system.

Figure 3 .
Figure 3. Functional diagram for the AI diagnosis system.

Algorithm 1 :
Substantiating diagnosis technique for the decision making person (doctor) 1.

Figure 8 .
Figure 8. Correlation matrix of simulation data.Based on a detailed analysis of the correlation matrix, it was found that the diagnosis O1 is established for the variables I16 (r = −0.47),I19 (r = −0.59)and I35 (r = −0.46).Consequently, the presence or absence of diabetic retinopathy is determined by the amplitude of the b-wave of the maximum ERG, the peak latency of the a-wave of the maximum ERG and the threshold of electrical sensitivity.The diagnosis O2 is established for variables I7 (r = 0.42), I10 (r = −0.44),I17 (r = −0.6),I19 (r = −0.58),I21 (r = −0.57),I23 (r = −0.51),I24 (r = -0.68),I27 (r = −0.56),I31 (r = 0.55), I33 (r = 0.49), I37 (r = −0.53)and I38 (r = 0.42).Therefore, the presence or absence of age-related macular degeneration is determined by the following parameters: difficulty reading, presence of detachment in the fellow eye, peak latency of the b-wave of maximum ERG, peak latency of the a-wave of maximum ERG, latency of the a-wave of cone ERG, amplitude of the b-wave of rod ERG, amplitude of the a-wave of rod ERG, latency of N1 mf-ERG, time of N95 PERG, lability of the optic nerve, amplitude of the a-wave of local ERG and latency of the a-wave of local ERG.The diagnosis O3 is established for the variables I10 (r = 0.53), I16 (r = −0.54),I28 (r = −0.47),I32 (r = 0.64), I36 (r = −0.43)and I39 (r = −0.37).Therefore, the presence or absence of retinoschisis is determined by the following parameters: the presence of detachment in the fellow eye, the amplitude of the b-wave of maximum ERG, the amplitude of PERG, the threshold of electrical sensitivity, the amplitude of N1 mf-ERG and the amplitude of

Figure 8 .
Figure 8. Correlation matrix of simulation data.The diagnosis O2 is established for variables I7 (r = 0.42), I10 (r = −0.44),I17 (r = −0.6),I19 (r = −0.58),I21 (r = −0.57),I23 (r = −0.51),I24 (r = -0.68),I27 (r = −0.56),I31 (r = 0.55), I33 (r = 0.49), I37 (r = −0.53)and I38 (r = 0.42).Therefore, the presence or absence of age-related macular degeneration is determined by the following parameters: difficulty reading, presence of detachment in the fellow eye, peak latency of the b-wave of maximum ERG, peak latency of the a-wave of maximum ERG, latency of the a-wave of cone ERG, amplitude of the b-wave of rod ERG, amplitude of the a-wave of rod ERG, latency of N1 mf-ERG, time of N95 PERG, lability of the optic nerve, amplitude of the a-wave of local ERG and latency of the a-wave of local ERG.The diagnosis O3 is established for the variables I10 (r = 0.53), I16 (r = −0.54),I28 (r = −0.47),I32 (r = 0.64), I36 (r = −0.43)and I39 (r = −0.37).Therefore, the presence or absence of retinoschisis is determined by the following parameters: the presence of detachment in the fellow eye, the amplitude of the b-wave of maximum ERG, the amplitude of PERG, the threshold of electrical sensitivity, the amplitude of N1 mf-ERG and the amplitude of the b-wave of local ERG.The diagnosis O4 is established for the variables I8 (r = 0.46), I18 (r = −0.418),I19 (r = −0.57),I32 (r = −0.41)and I33 (r = −0.45).Therefore, the presence or absence of retinal detachment is determined by surgical intervention, the amplitude of the b-wave of maximum ERG, the peak latency of the a-wave of maximum ERG, the threshold of electrical sensitivity and the lability of the optic nerve.Thus, the main determinants (markers) of the diagnosis O1 (diabetic retinopathy) are objective data obtained from the electrophysiological complex-variables I16 (maximum ERG, b-wave amplitude), I19 (peak latency of the a-wave of maximum ERG) and I35 (amplitude of rhythmic ERG at 30 Hz).The markers of the diagnosis of O2 (age-related macular degeneration) are the patient's history data-variables I7 (difficulty reading) and I10 (the presence of detachment in the fellow eye) -and the measurement data-I17 (peak latency of b-wave), I19 (peak latency of a-wave of maximal ERG), I21 (peak latency of a-wave of cone ERG), I23 (Rod ERG, b-wave amplitude), I24 (amplitude of a-wave of rod ERG), I27 (peak latency of a-wave of cone ERG), I31 (time N35, P50, N95 PERG), I33 (lability

Figure 9 .
Figure 9. Color distribution scheme of retinal pathology marker factors.

Table 1 .
Ling istic variables and range of their values.
This group of experiments investigated the output variable O1, which determines the absence of pathology.Despite the absence of a key factor for the development of diabetic retinopathy-diabetes mellitus-, not all objective parameters are within normal limits.Particular attention should be paid to the age of 61-80 years, which is characterized by the presence of the diagnosis O2-age-related macular degeneration.The result of the simulation modeling indicates the presence of dry age-related macular degeneration.

Table 2 .
Results of statistical characteristics evaluation for MAUC, MMCC metrics for two classifiers-RB and SGB.

Table 3 .
Results of parametric t-test and non-parametric Wilcoxon test.