Information System for Visual Analyzer Disease Diagnostics Ihor Bodnarchuk2[0000-0003-1443-8102], Nataliia Kunanets1[0000-0003-3007-2462], Serhii Martsenko2[0000-0003-2205-0204], Oleksandr Matsiuk2[0000-0003-0204-3971], Anastasiia Matsiuk2[0000-0002-1487-2606], Volodymyr Pasichnyk1 [0000-0002-5231-6395], Roman Tkachuk2[6701559602], Hryhorii Shymchuk2[0000-0003-2362-7386] 1 Lviv Polytechnic National University, St. Bandera str., 12, Lviv, Ukraine vpasichnyk@gmail.com, nek.lviv@gmail.com 2 Ternopil Ivan Puluj National Technical University, Ruska str., 56, Ternopil, Ukraine marcenko@cei.net.ua, oleksandr.matsiuk@gmail.com Abstract. The article is devoted to the problems of construction the recommen- dation information system for visual analyzer disease diagnostics by electro- retinograms. The mathematical electroretinogram model in the form of linear stochastic process is constructed. Method of comparative analysis of electro- retinogram angle coefficients as vectors in linear space providing ERG imple- mentation selection before diagnostics is proposed. Angular coefficients and coefficients for orthogonal signal decomposition in the system of basis Cheby- shev, Kravchuk, Lager functions are proposed for application. In order to make diagnostic decision the statistical method of hypotheses testing developed on the basis of likelihood ratio logarithm analyses (Neumann-Pearson criterion) is used. Keywords: visual analyzer, electroretinogram, statistical hypothesis, linear random process 1 Introduction Nowadays modern information technologies and IoT services have been or are being implemented actually in all healthcare spheres. Due to the information technologies use the doctors are able to carry out objective disease diagnosis, store and use selected information effectively at all stages of direct care. These are the overall information- recommendation systems which make it possible to provide selection processes, stor- age and processing of information as well as recommendations for proper diagnostic decision-making by doctors on the basis of received information. Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0) 2019 IDDM Workshops. 2 2 State of research The basis of the visual analyzer disease diagnostics is the comprehensive investiga- tion at the early stages of pathology using the latest medical techniques, modern diag- nostic equipment for reliable prediction and early treatment. Despite the large number of examination and diagnostic techniques, visual system treatment, the problem of ensuring the disease accurate diagnosis is still very im- portant. Among the existing diagnostic techniques special attention lately is paid to the method of evoked potentials. [1,2] The essence is to diagnose the disease by anal- ysis of electroretinograms (ERG), each of which is the response to the eye retina irri- tation in the form of short-time light impulse of a certain intensity, duration and wave length.[1,3,5] The problem of ensuring the selection and proper statistical processing of biomedi- cal information, recognition and evaluation of informative diagnostic parameters providing registration of changes in the human body is very important in medical eye research practice. The use of computer equipment makes it possible to systemize ex- isting statistical data. Foreign samples of medical radio-electronic equipment used in Ukraine have sev- eral disadvantages: they do not provide complete examination of the visual system, automation of electrophysiological signals analysis, high cost of the above listed di- agnostic systems, absence of diagnostic unit providing the diagnosis of visual analyz- er disease. 3 Information system The general schematic structure of information system for eye disease diagnosis de- veloped according to the requirements of International Technical Commission on Electroretinogrphy is shown in (Fig. 1) [8]. Micro suction pump Bioelectrical Analog-digital Control and information Bioobject Electrodes amplifier converter display unit Photostimulator Fig. 1. General schematic structure of IS for eye disease diagnosis The system consists of special non-polarized electrode for weak signals selection; micro suction pump is designed for sensor holding on eye cornea. Signals amplifica- tion and filtering is carried out by highly sensitive amplifier of biopotentials. Received data processing is performed by specially developed application program package for analysis and diagnosis of patients by means of electroretinograms based on investigations carried out by the authors. 3 4 Electroretinogram models in the form of linear stochastic process ERG is the output signal of the visual system where light signals (of various intensity, frequency, duration) are sent to its input. The mechanism of ERG formation makes it possible to consider the visual system as linear one and describe ERG by means of stochastic process  t    k   k , t , t   ,   (1) k : k t where   k , t  - impulse response of the visual system,  1   0   1  ...  t - time of elementary impulses occurrence,  k - random variables characterizing impulse amplitudes. Generalization of the model (1) is linear stochastic process   t      , t d   (2)  where    is the stochastic process with independent increase which growth points coincide with moments  k in (1), and jump values are equal If we assume that the visual system is invariant in time i.e., for its impulse response   , t    t    , then the ERG model is the stationary linear stochastic process   t     t   d   (3)  In general case the impulse response depends not only on time variables  and t but on spatial coordinates. Taking into account mentioned above the EKG model is substantiated in the form of linear random field   (t , r )     ( , t , s, r )d d s ( , s), (4)  R3 where  , t are time parameters considered in models (1) – (3); s is the point in space R3 , where visual system input is located; r is the point of output location i.e., the point where ERG is observed;  ( , t , s, r ) is the impulse space-time transition function;  ( , s) is nonuniform field with independent increases both in time and space characterizing the input signal intensity. In case when the visual system is invariant in time its model is linear uniform rela- tively to spatial variables and stationary in time field.   (t , r )     (t   , s, r )d d s ( , s). (5)  R3 4 Providing that in (4) or (5) the spatial coordinates s and r are fixed we derive the partial case of these models i.e., linear stationary process (3) or linear process (2) relatively. When there is no photostimulation the signal received by the sensor is represented as (3). Let us assume that the kernel    has finite duration denoted as 0 . When short-term photostimuli with period   0 are sent the visual system, then the inves- tigated process is represented in the following way   (t )    (t   )d ( ( )  I  ), (6)  N 1 where I    I 0 U (  n), I0 is one stimulus capacity (moreover n 0 I 0  D   ), © 1, t  0 U     is Heaviside function, 0, t  0  is stimuli feeding period, N is stimuli amount in one session. Otherwise (6) is additionally represented as follows    (t )    (t   )d ( )    t   d I  , (7)   where the second summand in (7) is the stationary linear system response sequence with impulse response    and influence of  -impulse sequence sent to its input. At the same time    is the kernel of linear stochastic process (3) to be estimat- ed. It is obvious that  N 1 M t   m   t   dI    m     t  nU t  nU n  1  t  (8)  n 0    where m  M   t -  d    1   d ,   -    1 is the cumulant of the random variable  1 . Taking into account the fact that during the synthesis of investigated signals regis- tration it is possible to develop the filter intended to filter off the “constant compo- nent” of the input signal, let us assume m  0 in (8). Thus, in order to estimate the process kernel (3) it is sufficient to estimate the mathematical expectation of the process (7) within the interval 0, 0  . The following is proposed as estimation 5 1 N 1 mt     t  n, t  0, 0  (9) N n 0 Thus, the kernel statistical estimate (3) is  t   mt , t  0, 0  ^ (10) Using statistical linearization method the authors investigated the systematic errors of analog-digital conversion of the input stochastic process from quantization and limitation of ADC operating range as well as the system instrument errors. 5 Statistical methods of decision-making in ophthalmology problems Using statistical approach (Fig. 2) on the basis of ERG model the structural diagram of diagnostic unit (Fig. 3) is developed. Mathematical model construction Determination of diagnostic features relatively to various patients state (on the basis of point 1) Selection of diagnostic spaces (training) and formation according to experimental data the training sets corresponding to specified diseases (based on point 1) Development of decision-making rules implemented on the basis of training sets by means of repeated ERG registration Fig.2. Diagram of the statistical approach to diagnosis The first stage of the diagram (Fig. 2) – the development of ERG model was im- plemented in point 1. Implementation registration Estimation of diagnostic parameters Formation of diagnostic spaces Decision-making Fig.3. Structural diagram of diagnostic unit 6 At the next stage new diagnostic features which make it possible to characterize patient’s status are determined. The angle between the kernel    which estimation technique is described above and certain function  0   corresponding HDL for as- sumed healthy patient is proposed to be used as the first diagnostic feature. More specifically:   arccos   , 0   (11)     0   where   ,0   is the scalar product of functions    і  0   (it is considered that these functions are Hilbert space elements);  is the norm operator. Angle  is also used to determine and consider the registration errors of “screwup”. Besides the angle (11), the expansion coefficient of mathematical expectation es- timation mt  (10) into generalized Fourier series in the system of Chebyshev, Lager and Kravchuk basis functions are proposed to be used as ERG diagnosis features (Fig.4, 5, 6). (Хі,1 is ERG implementation, ff(і) is approximate function). Fig.4.a)spectrum of expansion coefficients in the system of Chebyshev basis func- tions; b) ERG implementation and approximate function Fig.5.а) spectrum of expansion coefficients in the system of Kravchuk basis func- tions; b) ERG implementation and approximate function 7 Fig.6. a) spectrum of expansion coefficients in the system of Lager basis functions; b) ERG implementation and approximate function According to Bessel inequality for Fourier series coefficients N 1 L 1  as 2    f t k 2 (12) s 0 i 0 where a s is coefficient of expansion into ERG-signal, f t k  is implementation of ERG-signal, i.e., the sum of squared coefficients of expansion into series does not exceed the signal energy. Thus at s   the expansion coefficient a s  0 (see Fig.4,a, Fig.5,a, Fig.6,a) and therefore the main information about the signal are in- cluded only by the first series coefficients. Let us introduce function N 1  as C N   L1s 0 (13)   f t k  2 k 0 0  C N   1 characterizing energy share carried by coefficients as , s  0, N  1 , of generalized Fourier series with relatively to the total signal energy. It is determined that in order to carry not less that 99% of energy by orthogonal ex- pansion coefficients (Fig.7,a), it is sufficient to take 8-10 expansion coefficients into Fourier series using Chebyshev functions system; 35-40 coefficients are required for Lager functions and 45-50 for Kravchuk functions. The number of orthogonal expan- sion coefficients in Chebyshev system of basis functions appeared to be smaller than in other basis functions (used in the investigation) contributing to total energy (Fig.7,b). Therefore they are selected as diagnosis features of healthy visual analyzer. It should be noticed that other orthonormal basis were investigated but they showed worse results than Kravchuk functions, particularly def basis. The obtained results are used in order to carry out the visual system disease diag- nosis. 8 Fig.7. Function dependency graphs C(N ) : 1- system of Chebyshen basis functions; 2- system of Lager basis functions; 3- system of Kravchuk basis functions. 6 Neumann-Pearson criterion On the basis of observation and analysis of assumed implementation xt  it is necessary to decide what values (from the given interval of possible values) accept parameters l l1 , l 2 ,...,l n  , the observer is interested in. That is on the basis of observed implementation processing xt  it is necessary to measure and estimate the required multidimensional parameter l . Let us consider the physical phenomenon mathematical model of which represents the stochastic process  t  . Let us formulate incompatible hypotheses H 0 , H1 ,...,H m relatively to the un- known model characteristics. The hypotheses testing task is to accept one of them according to the observed implementation results x (t ) , 0  t  T the stochastic pro- cess  t  . Each decision is the result of statistical decisions based on observations. Let us denote by і the decision to accept hypothesis  i , then  i  , i  0, m , where Г is the decision space. The decision space Г coincides with parameters size  , and elements of set Г are estimates of the unknown parameter   v    . The decision selection rule  depicts the observation space X on decision space  Г: X  . In hypotheses testing problem В  j , j  0, m according to sample x with size n each decision section rule  divides the space into m  1 non-overlapping areas: xj  X n, j  0, m, x  X j ,  j  Г ,   D D is a set of decision selection rules. It is obvious the broader knowledge about the signal characteristics of healthy and sick patient the observer has, the easier the diagnosis problem is solved. 9 The estimated paremeter is random variable for observer. In such situation the most complete information about the possibilitis of parameter value as given by pro- sterior probability density which is assumed probability dencity of parameter if given implementation xt  is accepted. The diagnostics problem can be reduced to hypotheses testing on one parameter or set of one-dimensional or multidimensional distribution function of the observed ran- dom value which can be stochastic process parameters. In order to carry out diagnostics let us introduce the following notations. Для про- ведення діагностування введемо наступні позначення. Let us denote the random values vector by  m  1 ,...,i ,..., m  each component of which i , i  1, m repre- sents the corresponding information parameter. In such a case the vector of imple- mentation  m is matrix  11 ,..., i1 ,..., m1     ...........................   k  k  k    1 ,..., i ,..., m  (14)    ............................    n  ,..., n  ,..., n    1 i m  where  mk  is the a priori vector of random values in k-th experiment.   x j ,k , j  1, m, k  1, n is implementations matrix (a posterior matrix). Each solu- tion corresponds to one experiment, the amount of lines – to experiments number, the number of columns – to informative parameters amount. Let us assume that components  i of vector  m are subjected to the normal dis- tribution law. підлягають нормальному закону розподілу. Let us denote the average vector  m value by  :   1 ,...,i ,...,m  (15) where i   i . Let us denote the correlation matrix of the same vector  m components by r11 ,...,r1i ,...,r1n .......................   ri1 ,...,rii ,...,rin (16) ....................... rm1 ,...,rmi ,...,rmn o o  where rij    i ,  j  .   On the basis of the introduced notations the distribution density  m is as follows [6] 10 1    1  Y   exp  Y  T  1 Y    2 (17) 2  2  2 m  where М is correlation matrix (16); Y is the argument of distribution density which during specific implementation investigation accepts their values. While diagnosing specific patients the mathematical expectation of vector  m accepts specific value actually defining (identifying) the disease. 0  For normal (healthy) patient let us introduce vector   0  ,...,i0  ,...,m0  .   1  Relatively with a certain disease existence   1 ,...,i1 ,...,m1 .  While examining the patient for disease presence we put forward two hypotheses.  0 - parameter in (3.43):    , ( 0) (18) 1 - parameter in (3.43):    , (1) (1) ( 0) where   . Further we consider hypothesis  0 as the main one and  1 as competitive кон- куруючою. To make decision about the correctness of one of the hypotheses we use the theory proposed by Neumann and Pearson based on the analysis of likelihood ratio logarithm The essence of Neumann-Pearson method is the selection of certain restriction C on the set of permissible values for which at given restriction of the probability of the first-order error    0 the value of the second-order error is minimized [6,7]. The function p m  derived from (17) by replacing the nonrandom argument замі- ною Y with random vector  m is called the likelihood function [6]. 1 P  m ,   l  m     (19)  0   P  m ,     It accepts the random values as the function of random vector  mk  and depends on the non-random vector parameter  , that is why we represent it as p m ,   p m  . Likelihood ratio l  m  is called the functions relation at various values  defined in hypotheses formulation (18). Let us denote by  n  the logarithm of likelihood ratio  1     mk  ,    n     k  n  n   ln        (20)  k 1   mk  ,    k 1 0     11 where    ( k )   (mk )  1     (1)          1     , k  1, n ; (1) 1 (1)  2 (1)   (1) (1)  1   mk  ,   is the likelihood function for hypothesis  1 ;   0    mk  ,   is the likelihood function for hypothesis  0 .   The sequence elements  ( k ) , k  1, n are Gauss magnitudes each linearly depend- ent on components of matrix (14). That is  ( k ) , k  1, n can be considered as discrete white noise or scalar Gauss stochastic process with discrete argument and independ- ent values [6,7]. Decision making connected with the hypothesis selection (18) is characterized by probability of the first and second order errors. The first order error occurs when the basic hypothesis  0 is rejected in case if it is true    1  0   (21) where  -is the level of criterion significance. The second order error– hypothesis  0 is accepted when hypothesis 1 is true    0 1  (22) where 1   is test strength. The main task in hypothesis acceptance is the selection on the set of permissible process values e of certain threshold С for which at the given value  , fixed (n ) sample volume n and the smallest  one can conclude that hypotheses  0 at  (n)  ln C and  1 at  (n)  ln C occur. Taking into account (19) the criterion of hypothesis  0 acceptance is as follows ~  m  1   (1) ( 0)   K (23)   and hypothesis 1 ~  m  1   (1) ( 0)   K (24)   where   ~ 1 n ( k )   1 n ( k ) 1 n (k ) 1 n ( k )   n k 1 m  n 1  ,..., n k 1  i ,...,  n k 1 m   (25)  k 1   ik  is the element of matrix (14). The formulae for calculation of the threshold value K and sample volume n are given from [6]: 12 K  k2 U  U    1  1  0  1  1  0 T     2U   U   2  (26)    n U   U   (27) 2 where 1 0  1 0  T  2       1      (28)     U  ,U  are quantiles of normal distribution. Let us consider the example of the above mentioned approach application for oph- thalmodiagnostics based on the parameters of orthogonal decomposition of ERG sig- nal. The diagnosis is carried out in three stages: at the first stage we determine the di- agnostic features corresponding to different patients states; at the second stage we form according to experimental data training sets (images) corresponding to specific matrix patients states; at the third stage we develop diagnostics rules make decisions according to training sets and recorded data. During the training course ERG of healthy and sick patients (it is not necessary to specify pathology type) were investigated. ERG registration system described in pa- per [4,8] was used for experiments. Learning outcomes: - vector of mathematical expectations of informative parameters foe hy- pothesis Н0 (healthy patient): 0    a1 ,...a10    339.5 55.4  146.7  56.1 57.9 79.1 23.9  46.4  49.4  6.9 - vector of mathematical expectations of informative parameters foe hy- pothesis Н1 (sick patient):  1   a1' ,...a10 '   170.9 51.7  105.4  59.7 27.8 665 32.4  30.6  46.5  12.3 Correlation estimates matrix 13  120 13  42  3.8 8.2 7  5.4  7.8  6.1 6.3     13 51  6.6  1.8 1.1 1.4  0.8  1.3 0.9 1.2    42  6.6 17 1.7  3.5  2.8 2.1 2.9  2.3  2.4      3.8 1.8 1.7 1.6  0.1  55 0.1 0.4  0.3  0.4    8.2 1.1  35  0.1 1.7 3.6  1.1  0.5 0.9 0.2     10 3  7 1.4  2.8  5.5 3.6 1.3 0.3  1.1 0.4 0.4      5.4  0.8 2.1 0.1  1.1  0.3 1.1 0.3  0.9  0.01   7.8  1.3 2.9 0.4  0.5  1.1 0.3 1.2  0.4  0.6      6.1 0.9  2.3  0.3 0.9 0.4  0.9  0.4 1.0 0.3   6.3  2.4  0.4  0.1  0.6 0.7   1.2 0.2 0.4 0.3 Setting     0.05 according to (26–28) we get  2  2.48 n  4.38 (accepting n  5 ), K  5.04 . On the basis of learning outcomes let us carry out diagnostic experiment. We get: X 10  260.8 25  139.1  43.2 60.7 60.8 14.3  35.8  36.6  7.9 , where X 10 is implementation; T X 10  1       173.6  K . Therefore we should accept hypothesis Н0 (1) ( 0)   – the patient is visual. It should be noted that the considered approach for problems solution related to synthesis of mathematical model of investigated signals with parameters which can be used as diagnostic features, methods of these parameters determination, diagnostic criteria construction are implemented as software package included in the developed information system for ophthalmodiagnosis by electroretinograms. 7 Conclusions 1. The mathematical model in the form of linear stochastic process is substantiated on the basis of physical-chemical processes occurring in the visual system and mecha- nism of retina biopotentials generation. 2. It is proposed to use the coefficients of orthogonal decomposition of ERG imple- mentations in the system of basis discrete argument functions (Chebyshev, Kravchuk,Lager) as diagnostic features. 3. In order to diagnose the visual analyzer disease the statistical decision-making theory is used. Criteria for decision-making according to informative features of ERG implementations (Neumann-Pearson criterion) is selected. 4. The proposed approach is implemented as application program package. 14 References 1. Zueva M.V., Shamshynova A.M., Tsapenko Y.V., Yakovlev A.A.: Electroretinography in assessing retinal function in cataracts. Guidelines. Helmholtz national medical research center for eye diseases. 24 (1990). (in Russian) 2. S.V.Dzubin, S.V.Martsenko, A.V.Matsiuk,M.V.Pryimak: The choice and substantiation of the mathematical model of electro-retinogram in the form of linear stochastic process. Computing, 6 (3), 95-99 (2007) 3. Standart for Clinical Electroretinography/ Special Article. International Standartization Commitee.- Documenta Ophthalmologica 73:303-311, 1990. 4. P. Falat, V. Pasichnyk, N. Kunanets, S. Martsenko, O. Matsiuk, O. Mytnyk, O. Duda: Telecommunication infrastructures for telemedicine in smart cities. International Work- shop on Informatics & Data-Driven Medicine (IDDM 2018). 256-266 (2018) 5. McCulloch DL, Marmor MF, Brigell MG, Hamilton R, Holder GE, Tzekov R, Bach M.: ISCEV Standard for full-field clinical electroretinography. Doc Ophthalmol 130,1–12 (2015) 6. Marchenko B.H., Myslovych M.V.: Vibrodiagnostics of bearing units of electrical ma- chines.- Кyiv, 192 p. (1992). (in Russian) 7. Bolshev L.N., Smyrnov N.V.: Math Statistics Tables. 482 (1965). (in Russian)- 8. Мatsiuk О.V., Tkachuk H.A.: Information-measuring system for diagnostics of diseases of the visual analyzer. International scientific-technical journal Measuring and computing de- vices in technological processes. 1, 127-131. (2004).- (in Ukrainian)