DEVELOPMENT OF A BAYESIAN BELIEF NETWORK FOR THE DIAGNOSIS OF VENTRICULAR ARRHYTHMIAS

Ventricular extrasystoles (VE) are considered the most dangerous type of heart rhythm disorders for human life, their timely detection, diagnosis and prevention are urgent issues of cardiology. In order to ensure the objectivity of diagnosis of VE, it is necessary to process a large amount of information related to the results of various medical studies, tests, anamnesis, accompanying diseases, etc., along with a long-term Holter ECG monitor. In order to process such a large amount of information and make a correct diagnosis, the issue of applying medical expert systems (MES) to doctors is currently relevant. ESs using probabilistic models based on Bayes' theorem are currently preferred because there are uncertainties in medical diagnosis issues that the same symptoms may be related to different diseases. The object of this study is the development and construction of a Bayesian belief network (BBN) for the purpose of diagnosing VEs. The choice of BBN is justified by the fact that they have the ability to combine several types of information, as well as the ability to manage uncertainties and work with incomplete information. The result of the application of the developed BBN is a probabilistic assessment of the diagnosis of VE. This network was built in the NETICA system from Norsys Software Corp. A distinctive feature of this work is that when compiling the table of conditional probabilities of BBN for the diagnosis of VE, together with the results of ECG and echo-ECG studies, data on the influence of additional factors that play a role in the occurrence of VE were used, such as the index of oxygen saturation of erythrocytes in the blood, changes in the thickness of the intima-media layer of the aortic artery and the amount of lipid fractions of blood plasma


Introduction
In the current era of rapid development of various medical instrumental research methods, in order to make an objective diagnosis, the doctor needs to process a large amount of information on the results of various medical examinations, tests, anamnesis about the patient, his/her complaints, concomitant diseases, etc. Processing such a large amount of information and making a correct diagnosis within a limited time allotted to a patient is a challenge even for experienced physicians. Medical expert systems (ES), currently called "Medical Decision Support Systems", are used to help minimize errors arising in the diagnosis process and to help make the right medical decisions [1][2][3]. Medical expert systems are of great practical importance. This is explained by the fact that even in the absence of a sufficient set of symptoms for a disease that can be fully diagnosed (i. e., in the lack of information), ES allows to solve the opposite problem: the issue of diagnosing the disease according to the observed symptoms. In this case, the issue of facing uncertainty in the provided information arises, because usually the same symptoms can be associated with several diseases. Probability models based on the Bayes theorem are now widely used in medical ES to manage such uncertainty. The essence of such a probability model, the Bayesian Belief Network (BBN) is certain a priori information about the disease using the Bayes theorem and the probabilistic assessment of apestrior information, i. e., diagnosis of the disease provided the results of research are available. Currently, the following are the main reasons for the widespread use of BBN: 1) the ability to combine several types of information (for example, information obtained from experts or obtained by statistical methods); 2) ability to work in conditions of lack of information (incomplete data); 3) the ability to allow identifying probabilistic causal relationships between many various types of factor sets and thus evaluate the effects and the distribution of their probabilities; 4) the ability to present data together in various images (using different types of variables such as set, interval, Gaussian, discrete, continuous); 5) simple understanding and visual nature of the relationship (which allows easy interpretation and analysis of the causation); 6) the application of the probabilistic method allows to play different variants of scenarios, and as a result being able to assess the possible effects which may happen and their probable distribution.
The Bayes theorem (or Bayes formula) is one of the main theorems of elementary probability theory and allows to calculate the probability of any event within the condition

DEVELOPMENT OF A BAYESIAN BELIEF NETWORK FOR THE DIAGNOSIS OF VENTRICULAR ARRHYTHMIAS S h a f a g S a m a d o v a
Assistant Teacher*

A k i f K h i d i r o v
PhD*

S i t a r a S u l e y m a n o v a
Assistant Teacher* R u s l a n M a m m a d o v ( ) The expression (5) in integral form can be ( ) Product-rule: according to the multiplication rule, the joint distribution can always be divided into multipliers: Similarly for multidimensional joint distributions, the equality can be written Sum-rule and Product-rule are the only possible operations that allow to consider probability as an intermediate step between truth and falsehood.
Let's suppose there is some knowledge about certain experiment and examination before beginning (Latin a priori) to conduct them. In the process of observation, this knowledge is gradually exposed to clarifications, that is, after observations (Latin a posteriori) new knowledge about events is formed. Let's assume that the unknown values of any quantity θ through its indirect x|θ characteristics are estimated.
Bayes theorem determines the order of knowledge transformation as a result of observations. Let's denote a priori knowledge about the quantity θ by p(θ). The probabilities x=(x 1 ,...,x n ) of the individual selections of quantity x corresponding to different values of θ are determined by the value of the truth similarity function p(x|θ). As a result of observations, our perceptions of the values of the quantity θ change according to the Bayes formula: ∫ θ θ As it is seen, the denominator of expression (9) does not depend on θ and is necessary to normalize the a posterior distribution density.
When studying the properties of objects in the subject area, the concept of information dependence between them is more natural for human thinking. People tend to think of the relationships between factors by three-level terms: Factor A affects factor C through factor B. Attempts to construct an intuitive-clear model of the subject area therefore lead to the need to use any language that is able to clearly identify and express the mediating dependencies between factors.
In probability theory, the concept of information dependence is modeled by the concept of conditional probability, which changes the certainty about the result of an event when new knowledge about other factors is obtained, provided that a certain set of factors is known.
The relationship between the elements is intuitively easier to understand by presenting the directional axis connecting these elements in the graph. A graph probability model is a probability model in which the dependencies between random quantities are presented in the shape of graphs. The nodes of a graph correspond to of occurrence of another event that is statistically related to it (i. e., to calculate the conditional probability). In other words, it is possible to more accurately calculate the probability of an event through the Bayes formula, taking into account previously known (a priori) information about it, as well as information from new observations. The peculiarity of the Bayes theorem is that it requires a large amount of calculations to put into practice, so Bayesian estimates began to be actively used only after the revolution in computer and network technologies [4].
In Bayes approach to probability theory, probability is considered not as an objective random, but as a measure of our being unawareness.
Suppose that the distribution densities of probabilities X and Y are random quantities p(x) and p(y). In general, their joint distribution p(x,y) is p(x,y)≠p(x)p(y). If equality is satisfied here, then the quantities X and Y are called independent quantities. Conditional probability p(x|y) (i. e., distribution of x with the occurrence of y) is quantity and its essence is to express how the fact Y=y affects the distribution of X. Note that, is not necessarily equal to the unit, because the second integral is not a probability with respect to y, but a function of true similarity. If equality | | p x y p x y p y p y x p x = = is used (1) relation can be written as follows: (2) is an expression of the Bayes theorem. All operations on probabilities are based on only two rules: sum-rule and product-rule.
Sum-rule: Suppose A 1 , A 2 , ..., A n are the events that mutually contradict one another, and only one of them occurs during the experiment (i. e., events that form a complete group). Then and ( ) 1 1.
Obviously, for any event B, the Bayes formula (2) is relation is true. Hence, for full probability P (B) the following equality is obtained random variables, and the axis correspond to direct probable interactions between random quantities. Graphic models are widely used in probability theory, statistics (especially Bayes statistics), and also in machine training. The Bayesian belief network is a graph probability model and is graphically represented by acyclic directed graphs (directed axis, which represent the relationship between nodes -conditional probabilities) and nodes of graphs (i. e., variables, diseases, symptoms). The nodes correspond to certain variables related to the process under study and are determined by a table of conditional probabilities. The mathematical apparatus of Bayesian networks was developed in [5]. In [6], it is possible to get acquainted with probabilistic graphical models and decision graphs, including Bayesian networks and influence diagrams, and also about how to create these models. The textbook [7] outlines the principles of creating probabilistic networks and expert systems.
Currently, medical expert systems are being used to minimize the errors that can occur in the process of making a diagnosis and assisting in making the right medical decisions. Since there is uncertainty in medical diagnostic matters regarding the fact that the same symptoms can be associated with different diseases, the current preference is for medical expert systems -Bayesian belief networks that use probabilistic models based on Bayes' theorem. BBN have the ability to combine several types of information, as well as the ability to manage uncertainties and work with incomplete information. Therefore, the research work devoted to the development of BBN for the diagnosis of ventricular extrasystoles is relevant.

Literature review and problem statement
Treatment of arrhythmias, especially ventricular extrasystoles, is one of the most important tasks of arrhythmology. Up to date, the number of patients in need of treatment with active antiarrhythmic medicines has not been fully determined. The study and identification of factors that play a role in the formation of arrhythmias allows to answer many questions that arise during the diagnosis and treatment of arrhythmias [8].
The literature presents a wide range of studies related to the classification of arrhythmias. The classification of arrhythmias, as indicated in [9], consists of two main stagespre-processing of the ECG signal and the decision-making stage (ECG segmentation). Currently, multiple approaches to the classification of arrhythmias are offered. In [10] a wide review of studies related to the detection of QRS complexes is presented. In [10], a comparative analysis of studies based on such approaches as wavelet-transformation, algorithms from the field of artificial neural networks, genetic algorithms, filter banks, heuristic methods based on nonlinear transformations of ECG elements for the classification of arrhythmias is presented. In [10], it is noted that the results of studies related to arrhythmias should be presented in accordance with the AAMI recommendations in order to be able to compare them. The authors of [10] point out the great difficulty in obtaining promising results for the SVEB and VEB heart rate arrhythmia classes, there are a huge number of proposed methods in the literature that do not follow a fairer assessment protocol.
The international standard AAMI EC57:1998 and its new edition AAMI EC57:2012 [11] describe a unified scheme for evaluating new methods for automatic detection of arrhythmias. In particular, they propose to create new models and algorithms for solving the problem of classifying R-peaks (rather than time segments of the ECG signal), identifying five clusters of classes: N (normal rhythm), SVEB (supraventricular ectopic extrasystole), VEB (ventricular ectopic extrasystole), F (fusion of normal and VEB), and Q (unknown rhythm type). Therefore, in order to assess the relative advantages and disadvantages of various algorithms, it is advisable to compare works that used the AAMI EC57 standards.
The paper [12] presents a method for automatic classification of electrocardiograms, which is based on the time intervals between successive contractions and their morphology for the ECG characterization.
In [13], a review of the best classifiers of heart rhythm disturbances by R-peaks, which do not use neural networks, analyze an explicitly specified feature space, and present their results in accordance with the recommendations of the international standard AAMI and the inter-patient partitioning paradigm for signals from MIT-BIH, was reviewed. It is shown that models using the proposed linguistic features achieve the best values of the jk-index metric compared to models based on other features that are actively used in practice. Despite a large number of works, there is still no method that can accurately process signals from open databases like MIT-BIH. Recently, more and more methods based on neural network models have appeared that directly process ECG signal samples [14][15][16]. In [14] paper introduces a new approach to detect and classify automatically cardiac arrhythmias in electrocardiograms (ECG) recordings. The proposed approach used a combination of Convolution Neural Networks and a sequence of Long Short-Term Memory units, with pooling, dropout and normalization techniques to improve their accuracy. In [15], an algorithm for the classification of 5 types of ECG arrhythmias based on deep learning is presented, which combines a network of autoencoder based on long-term short-term memory with a support vector machine. According to the authors, the proposed method can better study the features than the traditional method without any prior knowledge, which represents a good potential for classifying ECG arrhythmias.
In [16], classification of the electrocardiogram was presented using reservoir calculation with logistic regression. The authors note that the proposed approach requires computationally inexpensive pre-processing of the electrocardiographic signal, which leads to a fast algorithm and approximation to a real-time classification solution. However, these methods based on neural network models do not have sufficient performance and interpretability and require more data for training. The active use of deep neural networks is due to their ability to automatically extract significant features from the signal in the learning process.
Extrasystoles are the most common among various heart rhythm disorders. Extrasystoles are heart rhythm disturbances that occur outside the main heart rhythm and manifest as excitation of the heart as a whole or its individual parts. The cause of extrasystole is explained by the presence of active heterotopic sources (foci) that generate an electrical impulse of sufficient power to disrupt the work of the main pacemaker the sinus node. Such pathological sources can occur both from birth and later due to age or lifestyle.
Depending on the localization of the heterotopic focus, which creates an extraordinary cardiac congestion, supraventricular (sinus, atrial, atrioventricular) and ventricular extrasystoles are distinguished.
Sinus and atrioventricular extrasystoles are rarely detected: 0.2 % and 2 %, respectively; atrial and ventricular extrasystoles are observed more often: 25 % and 62.6 %, respectively [17]. Ventricular extrasystoles, which are the most life-threatening type of cardiac arrhythmia, are considered one of the main causes of sudden cardiac death, one of the important studies of arrhythmology. Their timely detection and objective diagnosis, as well as proper prevention, remain one of the urgent problems. If it is impossible to eliminate these disorders -ventricular extrasystoles in patients with the help of modern drugs and surgical methods, it is necessary to implant a cardioverter-defibrillator [17].
To ensure objectivity in the diagnosis of ventricular extrasystoles, it would be expedient to use a Bayesian trust network using the patient's anamnesis, examination and other a priori information along with the results of the analysis of ECG signals, which we did not find any studies on this issue in the literature.

The aim and objectives of the study
The aim of this work is the development and construction of BBN for the diagnosis of ventricular extrasystoles. The BBN being developed can help physicians in assessing the probability of a VE diagnosis based on a priori information and the results of observed experiments, and will also provide new knowledge aimed at improving the accuracy of the forecasting process using the obtained apestorial information.
To achieve the aim it is necessary to solve the following objectives: -justify the choice of the type of ventricular extrasystole for the purposes of the study; -collection of primary data on ventricular arrhythmias (examination results and anamnesis, i.e. symptoms), conduct instrumental studies (electrographic and Doppler echo studies) for diagnostic procedures; -select a software environment for building a Bayesian trust network, build network structures, implement network compilation and use it to carry out a probabilistic assessment of the diagnosis of the selected type of ventricular arrhythmia.

Materials and methods of research
The object of the study is the BSD for the diagnosis of arrhythmias. To train the network, information obtained from the outpatient lists of 142 patients admitted to the Omur clinic in Baku was used. This information was: the results of an ECG study conducted on a 12-channel device SCHILLER CARDIOVIT manufactured in Switzerland; color Doppler echocardiographic study of patients on the Aloka 5500 device manufactured in Japan using a 3.25 MHz transmitter in M-modal, B and PW modes; heart rate of patients and registration of 24-hour ECG monitoring using the Medilog FD-5 device manufactured in England.
Work with the developed BSD consisted of two main operations: the first stage was a preliminary classification by electrocardiography, the second stage was an assessment of the accuracy of the diagnosis using additional information obtained by echocardiography. This evaluation procedure was performed using the Bayesian Web of Trust. Bayesian belief networks are more often used to make judgments under uncertainty, including in diagnosing diseases, choosing the optimal course of treatment for a patient, predicting disease outcomes, and modeling diseases. The process of working with this network consists of two main operations: -training the network based on the information we have about the network variables, i. e. compilation of a table of conditional probabilities; -calculation of various probabilities associated with network variables using a Bayesian reliability network.
For the effective use of the Bayesian network apparatus, advanced computer technologies and software products are required. The most popular packages for working with Bayesian networks include BayesiaLab [18], AgenaRisk [19], Bayes Server [20], Netica [21], Hugin Expert [22] and other programs.
In the research, the application of the Bayesian network was implemented using the Netica software of the Canadian company "Norsys Software Corp" [12].
Netica is a software with a wide range of capabilities for setting up reliability networks and working with impact diagrams, an easy-to-use and a software with intuitively understood interface. In the Netica software, it is possible to use Bayesian networks to perform output results in different configurations using the fastest and most modern algorithms. In the condition of limited information, Netica allows to find suitable values or probabilities for all unknown variables. Netica has the ability to make conditional plans. Netica can be used to seek for optimal solutions from impact diagrams, which serve to maximize the expected values of a given variable.
A diagnostic probability table is compiled based on the initial data to set up the Bayesian network in the Netica program. This diagnostic table includes D 1 , D 2 , ..., D m diseases (diagnoses) belonging to a certain class of diseases, S 1 , S 2 , ..., S n symptoms related to these diseases, as well as a set of conditional probabilities corresponding to p(S i /D k ).
If a patient is diagnosed with D k (i. e., a D k event has occurred), then the probability of a specific S i symptom observation associated with the disease is called a conditional probability ("S i when D k ") and is denoted by p(S i /D k ). For example, the conditional probability of p(S 2 /D 1 ) is determined by the Bayes theorem.
The main hypothesis of the study when working with BBN is as follows. If it is known that a S i symptom concerning D k disease is observed in the patient during the medical examination, then the probability of D k diagnosis correctness for this symptom (this conditional probability is denoted as p(D k /S i )) is calculated according to Bayes theorem as follows [23]: The diagnosis procedure is performed not according to one symptom, but several symptoms observed in the patient (i. e., according to the symptom complex, for example, S ci =(S 1 , S 3 , S 6 , S 7 , S 9 , S 10 , S 11 , S 14 )) and the probability of D k diagnosis validity for this symptom complex is expressed by the Bayes theorem as follows: According to the formula for multiplying probabilities, the conditional probability p(S ci /D k ) of the symptom complex in expression (3) is defined as In order to find the conditional probability of the whole symptom complex, it is possible to multiply the conditional probabilities of individual clinical symptoms when these probabilities do not depend on each other.
p(S c ) in expression (12) is a complete probability and is expressed as the probability that the symptom complex is present in all diseases and is defined as follows: (14) where i is the number of symptoms and j is the number of diseases (arrhythmias) with these symptom. When calculating the diagnosis of several various diseases on the basis of S ci symptom complex observed in the patient, the fact that each symptom has a different probability in various diseases is taken into account.
To simplify the work with the BSD, it is assumed that the network includes only nodes presenting themselves with diseases, observed symptoms, and the results of instrumental studies. And the risk factors that affect the occurrence and development of PVCs, such as, for example, bad habits, unhealthy lifestyle, unfavorable heredity, are not included in the network.

1. The choice of the type of ventricular extrasystole
In this work, ventricular extrasystoles are divided into gradations based on the Lone-Wolf classification. According to this classification, extrasystoles were evaluated on a 5-point system, as shown below: -0 points -no ventricular extrasystole; -1 point -less than 30 ventricular extrasystoles per hour are recorded; -2 points -more than 30 ventricular extrasystoles per hour are determined; -3 points -Polymorphic ventricular extrasystole; -4 points: a) Paired double ventricular extrasystoles; b) paroxysmal (3 or more) ventricular extrasystoles; -5 points -early (R wave over T wave) ventricular extrasystoles.
The correct identification of gradations in the diagnosis of ventricular extrasystoles is of great importance for the choice of treatment tactics.
The main methods of diagnosing arrhythmias are electrocardiography, echocardiography, 24-hour Holter moni-toring, and additional diagnostic methods are transesophageal echocardiography and a physical stress test. With the help of these methods, ventricular extrasystoles in 4 and 5 points are very clearly determined, and there is no need to estimate the probability of their recognition. Ventricular extrasystoles of 0-2 points are observed in healthy people and do not pose a great threat to life. Since 3-point ventricular extrasystoles change to higher gradations at any moment and pose a danger to the heart, it is very important to detect or predict them in time so that the patient can be treated with medication in time. In connection with this, the issue of diagnosis of 3-point ventricular extrasystole was considered in the study.

2. Data collection and instrumental studies of ventricular arrhythmias
Holter monitoring for 24 hours to detect changes in heart rate was performed in 142 patients. The studied patients were divided into 4 groups according to the Lown-Wolf classification depending on the gradation of arrhythmias [24] and the corresponding diagnoses were designated as D 1 , D 2 , D 3 and D 4 .
Patients without arrhythmia were included in the 1st group, which we conditionally call the control group. Their number was 36 people.
The number of ventricular extrasystoles was less than 30 per hour in 47 patients included in the 2 nd group. Extrasystoles were rare, single and monotopic in patients included in this group. Therefore, according to the classification of Lown and Wolf, patients included in this group were assigned to the 1st gradation.
In 32 patients included in the 3 rd group, the frequency of ventricular extrasystoles exceeded 30 per hour. Extracysts in these patients often had a monotopic character. Members of this group belonged to the 2 nd gradation.
27 patients included in the 4 th group had polytopic ventricular extrasystoles and were assigned to the 3 rd gradation.
Since extrasystoles belonging to the 4 th group of these groups pose a great threat to the health of patients, the assessment of the probability of diagnosing D4 was carried out using a Bayesian network. Since ventricular extrasystoles of the fourth and fifth gradation are clearly defined on the ECG, their assessment is not required.
Echocardiography was used to determine changes in the intima-media layer of the vascular wall and the number of lipid fractions of blood plasma, as well as changes in the state of lipid peroxidation in peripheral blood and leukocytes, depending on the gradation of extrasystoles, and determined the correlation of these changes with the gradation of arrhythmias.
Based on the results of the study of arrhythmias obtained by us and information taken from the literature, the diagnostic table described in Table 1 for D4 disease was compiled, i. e. Table 1 of conditional probabilities of symptoms.
The patient's questionnaire (or anamnesis results) completed by a doctor and current state (status) of health research are taken as a basis in the compilation of a table of conditional probabilities and in the diagnosis of cardiac arrhythmias in general.
When downloading NETICA, the menu bar, toolbar and network window open on the screen. In edit mode ni, a new empty network opens, the construction of which is started. Adding nodes (variables) is done by pressing F9 key and clicking on the network window with the mouse. For each node, its properties should be defined, including the name, a set of values of possible cases, a probability table, etc. (Fig. 1).
Then it is necessary to fill in the tables of unconditional probabilities. To do this, the program calls and fills the probability table for each variable using the Ta-ble button. Fig. 2 shows an unconditional probability table for the S1_ UDSD -"heart stopping and then beating" symptom. Fig. 1. Adding properties to nodes (for S1_UDSD node -symptom) Table 1 Table of conditional probabilities of symptoms of ventricular extrasystoles belonging to the fourth group (diagnosis D 4 )

Symptoms
Probabilities of symptoms existence in the disease S 1 heart stopping and then beating 69 % S 2 -sudden stop of the heart between heartbeats after food intake and then its rhythmic beating for about 1 minute 22 % S 3 -while taking a horizontal position, and especially when lying on the left side, heart stopping suddenly and then beating 9 % S 4 -when the number of ventricular extrasystoles is more than 30 per hour 23 % S 5 -Oxygen saturation index of erythrocytes in the blood <22 11 % S 6 -Measurement of the intima media layer thickness of the aortic artery >3,370 mm 41 % S 7 -frequent and polytopic nature of ventricular extrasystoles 19 % S 8 -age limit >40 15 % Fig. 2. Estimation of unconditional probabilities: unconditional probability table for the symptom S1 _UDSD -"heart stopping and then beating" Setting up cause-and-effect relationships between nodes. Once we have created all the nodes, placed them, and determined the unconditional probabilities of their properties, it is necessary to connect them according to the cause-and-effect relationship between them. To do this, the axis on the toolbar of the program is used. The next step is to determine the conditional probability tables for each of the dependent nodes. As an example, Fig. 3 shows the conditional probability table created for the symptom: S4_MES>30 -"the number of ventricular extrasystoles is more than 30 per hour." Conditional probability tables are compiled in a similar manner for the remaining nodes.

3. Bayesian network compilation
After determining all the conditional probabilities between the nodes of the network, it is necessary to compile it (Fig. 4). To do this, the Network->Compile item is selected from the menu. If the compilation is error-free, then the network is ready for use. As a result of the compilation, the operation of calculating the values of the conditional probabilities of non-marginal nodes of the network is also performed.
The description of the Bayesian network in the Netica program for the diagnosis of ventricular extrasystoles is given in Fig. 4. The names of the nodes (variables) correspond to Table 1.

Discussion of the results of the study
The article studied the assessment of the probability of diagnosing a 3-point gradation according to the Lown-Wolf classification of ventricular extrasystoles using BBN. Let's justify the choice of this gradation as follows: VE 4 and 5 points are very clearly defined using ECG registration methods, and their recognition does not require a probability assessment; Ventricular extrasystoles of 0-2 points are also observed in healthy people and do not pose a great threat to life; Since 3-point VEs at any time move to higher gradations and pose a threat to life, it is very important to predict them in time and accurately so that therapeutic measures can be taken in time.
Since the research process was carried out on the basis of incomplete and undefined information taken from outpatient charts of patients, BBN was used for the diagnosis of VE. With the help of BBN, the procedure for assessing the reliability of information obtained by the use of instrumental methods was carried out. As nodes of the BBN, which are usually used in the diagnosis of diseases, they accept: 1) risk factors that stimulate the occurrence of diseases; 2) the totality of the considered diseases; 3) the observed symptoms, the results of laboratory studies, and instrumental studies.
In the BBN presented by us, the probabilistic assessment of the diagnosis of only one disease -3-point VE is considered. Risk factors are not included in BBN. Symptoms, results of laboratory and instrumental studies, used for training BBN, are presented in Table 1. Based on these data, the result of the BBN configured by us in the NETICA system is 59.9 % of the probability that the patient has a 3-point VE (Fig. 4).
A distinctive feature of our work is that when diagnosing ventricular extrasystoles, the ECG approach was combined with Doppler echocardiographic studies, and the influence of other factors that play a role in the occurrence of arrhythmias was taken into account. These factors include the following as indicated above: index of oxygen saturation of erythrocytes in the blood; measurement of the thickness of the intima-media layer of the aorta artery; changes in the number of lipid fractions of blood plasma.
Manipulating the conditional probabilities of the symptoms through the proposed Bayesian network, it allows to track the dynamics of changes in the posterior probability. This network provides additional opportunities for doctors to clarify and make responsible decisions.  Table 1 As the limitations of the developed BBN, it can be noted that only one disease and risk factors leading to VE are considered, not included in the network.
The BBN presented in this paper can be improved in two ways: by changing the topology of the network, that is, by adding important nodes to the network that were omitted in the first version; This can be done by correcting the values of the conditional probabilities.
The main difficulties in working with Bayesian networks are the lack of a common choice, the lack of rules, the knowledge of a large number of conditional probabilities for complex systems, and the complexity of analyzing their sensitivity.

Conclusions
1. Based on the Laun-Wolf classification of ventricular extrasystoles, extrasystoles corresponding to scores 4 and 5 out of gradations 0-5 and considered very life-threatening are very clearly visible on a regular ECG and are easy to distinguish. But the distinction of extrasystoles according to the gradation of 0-3 points requires the solution of such a complex issue as long-term Holter monitoring and ECG analysis. Among these gradations, especially the 3-point gradation (in this work we designated it as D4) can at any time change to more dangerous gradations if preventive measures are not taken. In this sense, timely detection and diagnosis of ventricular extrasystoles corresponding to a 3-point gradation directly according to the Lown-Wolf classification is very important.
2. The conducted analysis of practical applications of medical ES showed the expediency of the Bayesian approach for solving the problems of early diagnosis of VE on the basis of patient information obtained from ambulatory cards. Data from 142 ambulatory patient cards were used to provide neodymium information and training for the developing BBN. In 27 of them, symptoms of the 3rd degree of VE were found, which were used to compile the table of conditional probabilities.
3. The Bayesian trust network was built in the Netica software environment. BBN contains 9 nodes, only one disease is considered -ventricular arrhythmia of the 3rd degree according to the Lown-Wolf classification, the remaining 8 nodes make up various characteristics of this disease: symptoms and results of laboratory studies.