<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Med. Technol.</journal-id>
<journal-title>Frontiers in Medical Technology</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Med. Technol.</abbrev-journal-title>
<issn pub-type="epub">2673-3129</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fmedt.2021.779800</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Medical Technology</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Multistage Classification of Current Density Distribution Maps of Various Heart States Based on Correlation Analysis and k-NN Algorithm</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Udovychenko</surname> <given-names>Yevhenii</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1485315/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Popov</surname> <given-names>Anton</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/639227/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Chaikovsky</surname> <given-names>Illya</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1031165/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Electronic Engineering Department, Faculty of Electronics, Kyiv Polytechnic Institute</institution>, <addr-line>Kyiv</addr-line>, <country>Ukraine</country></aff>
<aff id="aff2"><sup>2</sup><institution>Institute of Cybernetics, National Academy of Sciences of Ukraine</institution>, <addr-line>Kyiv</addr-line>, <country>Ukraine</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Kunal Pal, National Institute of Technology Rourkela, India</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: S&#x00142;awomir Wilczy&#x00144;ski, Medical University of Silesia, Poland; Monika Machoy, Pomeranian Medical University, Poland</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Yevhenii Udovychenko <email>yevhenii.udovychenko&#x00040;gmail.com</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Medtech Data Analytics, a section of the journal Frontiers in Medical Technology</p></fn></author-notes>
<pub-date pub-type="epub">
<day>08</day>
<month>12</month>
<year>2021</year>
</pub-date>
<pub-date pub-type="collection">
<year>2021</year>
</pub-date>
<volume>3</volume>
<elocation-id>779800</elocation-id>
<history>
<date date-type="received">
<day>19</day>
<month>09</month>
<year>2021</year>
</date>
<date date-type="accepted">
<day>08</day>
<month>11</month>
<year>2021</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2021 Udovychenko, Popov and Chaikovsky.</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Udovychenko, Popov and Chaikovsky</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license> </permissions>
<abstract><p>Magnetocardiography is a modern method of registration of the magnetic component of electromagnetic field, generated by heart activity. Magnetocardiography results are a useful source for the diagnosis of various heart diseases and states, but their usage is still undervalued in the cardiology community. In this study, a two-stage classification by correlation analysis using a k-Nearest Neighbor (k-NN) algorithm is applied for the binary classification of myocardium current density distribution maps (CDDMs). Fourteen groups of CDDMs from patients with different heart states, healthy volunteers, sportsmen, patients with negative T-peak, patients with myocardial damage, male and female patients with microvascular disease, patients with ischemic heart disease, and patients with left ventricular hypertrophy, divided into five and three different groups depending on the degree of pathology, were compared. Selection of best metric, used in classifier and number of neighbors, was performed to define the classifier with best performance for each pair of heart states. Accuracy, specificity, sensitivity, and precision values dependent on the number of neighbors are obtained for each class. The proposed method allows to obtain a value of average accuracy equal to 96%, 70% sensitivity, 98% specificity, and 70% precision.</p></abstract>
<kwd-group>
<kwd>magnetocardiography</kwd>
<kwd>current density imaging</kwd>
<kwd>current density distribution map</kwd>
<kwd>k-NN classification</kwd>
<kwd>ischemic heart disease</kwd>
<kwd>heart failure diagnostics</kwd>
<kwd>correlation analysis</kwd>
</kwd-group>
<counts>
<fig-count count="5"/>
<table-count count="4"/>
<equation-count count="11"/>
<ref-count count="14"/>
<page-count count="9"/>
<word-count count="4545"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>Introduction</title>
<p>Magnetocardiography (MCG) is a non-invasive and risk-free technique of measuring magnetic field generated by the electrical activity of the heart using extremely sensitive devices, such as a superconducting quantum interference device. MCG can be applied along with electrocardiography (ECG) to get the information on the state of a patent&#x00027;s cardiovascular system and provides additional opportunities for visualization and analysis of obtained data (<xref ref-type="bibr" rid="B1">1</xref>), although at the moment most efforts in MCG signal processing are made mostly for its informative representation (<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B3">3</xref>).</p>
<p>Magnetocardiographic mapping is performed for diagnostics of ischemic heart disease (<xref ref-type="bibr" rid="B4">4</xref>), Wolf-Parkinson&#x00027;s-White syndrome (<xref ref-type="bibr" rid="B5">5</xref>), and other heart failures associated with current flow changes in heart muscles. Fairly good results have been achieved in the classification of current density vector maps based on clusters analysis for coronary artery disease and ischemic heart disease detection in patients with normal or unspecifically changed ECG (<xref ref-type="bibr" rid="B6">6</xref>) and echocardiogram (<xref ref-type="bibr" rid="B7">7</xref>). Nevertheless, the classification of MCG data, especially current density distribution maps (CDDMs), is on its starting point and is applied only for specific disease diagnostics.</p>
<p>In our previous study, we applied different technics, such as decision trees, support vector machine, and k-NN with different metrics for multiclass classification and obtained accuracy in the range of 55&#x02013;65% (<xref ref-type="bibr" rid="B8">8</xref>), which is not satisfactory for wider clinical applications. In our further study, we developed a multiclass classifier based on correlation analysis (<xref ref-type="bibr" rid="B9">9</xref>), with value of accuracy equal to 95%, in order to provide a tool for the complex analysis of a patient&#x00027;s cardiovascular system by MCG. In other study, we applied a k-NN algorithm for the binary classification of CDDMs for ischemic heart disease recognition (<xref ref-type="bibr" rid="B10">10</xref>). Developed classifiers showed accuracy in the range of 60&#x02013;90% depending on the type of CDDM. In other study, we developed a k-NN classifier in order to distinguish normal heart state from heart failures, such as negative T-peak and microvessels (diffuse) abnormalities (<xref ref-type="bibr" rid="B11">11</xref>). Additionally, we advanced our algorithms to reach higher classification performance.</p>
<p>The aim of this study is to develop a multistage classifier by combining two methods: correlation analysis as the 1st stage, performed for multiclass classification, and k-NN classification as the 2nd stage to make the result of previous stage more accurate.</p>
</sec>
<sec id="s2">
<title>Data Collection and Method Description</title>
<sec>
<title>Formation of CDDMs Using MCG Data</title>
<p>For spatial data capture during MCG measurements, observation points are the intersection nodes of a square grid, which is binding to anatomical landmarks on the thorax. As the number of nodes is limited, in order to localize areas of pathological activity of the myocardium and to build maps of instant distribution of magnetic field induction in the heart, smooth filling and interpolation of the function of two variables in the points beyond the bounds of a standard grid are usually performed. Thus, instant magnetic field distribution maps are built using two-dimensional interpolation algorithms and based on synchronous averaged MCG curves. Then, the MCG inverse problem is solved, and the map of magnetic field distribution can be converted into an instant CDDM (<xref ref-type="bibr" rid="B12">12</xref>).</p>
<p>Each CDDM in this study is formed by transformation of current density vectors, obtained from MCG. Each CDDM is a grayscale discrete image with dimensions of M &#x000D7; N pixels, where white color corresponds to the highest brightness, and the black color corresponds to the lowest brightness (<xref ref-type="fig" rid="F1">Figure 1</xref>). Thus, the brightness of an image corresponds to the current density value in a particular point.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Example of current density distribution map of <bold>(A)</bold> person with normal heart state and <bold>(B)</bold> patient with ischemic heart disease.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fmedt-03-779800-g0001.tif"/>
</fig>
<p>In most cases, CDDMs are calculated for precise time instants with some steps (up to 10 ms) during T wave of electrocardiogram QT interval. This enables a researcher to associate ECG data with corresponding characteristics calculated from CDDMs. Each CDDM is normalized by maximal value (<xref ref-type="bibr" rid="B13">13</xref>).</p>
</sec>
<sec>
<title>Multiclass Classification Based on Correlation Analysis</title>
<p>The main idea of the method of current density distribution map classification based on correlation analysis is to find and compare the correlation coefficients of the map under analysis with each of the maps in the reference set. Reference set consist of pre-classified by the doctor current density distribution maps, each of which belongs to one of the groups corresponding to a certain state of the cardiovascular system. For each of the classified maps, the correlation coefficients of the vector of values and the vector of directions with the corresponding vectors of each of the maps from the reference set are calculated as follows:</p>
<disp-formula id="E1"><label>(1)</label><mml:math id="M1"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mfrac><mml:mrow><mml:mstyle displaystyle="true"><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mstyle displaystyle="true"><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msqrt><mml:msqrt><mml:mrow><mml:mstyle displaystyle="true"><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>Where <italic>n</italic> is the dimension of the vectors, for our case <italic>n</italic> = 100,</p>
<p><italic>x</italic><sub><italic>i</italic></sub>, and <italic>y</italic><sub><italic>i</italic></sub> are values of vectors for which the correlation coefficient is calculated and</p>
<p><inline-formula><mml:math id="M2"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>, and <inline-formula><mml:math id="M3"><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> are the mean values of the vectors, calculated as follows:</p>
<disp-formula id="E2"><label>(2)</label><mml:math id="M4"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mfrac><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mtext>&#x000A0;</mml:mtext><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E3"><label>(3)</label><mml:math id="M5"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mover accent="false" class="mml-overline"><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo accent="true">&#x000AF;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mfrac><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mtext>&#x000A0;</mml:mtext><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>After that, the values of the obtained correlation coefficients for two vectors are multiplied; thus, the resulting correlation coefficient is obtained, which takes into account both the modulus correlation and the direction of the current density vectors. As a result, a set of the resulting correlation coefficients with the maps of each group of the reference set is obtained for each map. After that, an array of <italic>m</italic> maximum values of the resulting correlation coefficient is formed for each group, and their average value is found. Thus, for each CDDM we obtain a set of key-value pairs with the groups corresponding to the state of the cardiovascular system as keys, and the abovedescribed average values of the maximum correlation coefficients as corresponding values. The maximum of these values indicates the group to which the map of the distribution of the current density to be classified should be assigned (<xref ref-type="bibr" rid="B9">9</xref>). The best result was obtained for <italic>m</italic> in the range of 1&#x02013;5, and the accuracy of classification in these cases is highest and does not significantly depend on the number of maximum values; therefore, in this study, we use <italic>m</italic> = 3.</p>
</sec>
<sec>
<title>k-Nearest Neighbor Algorithm</title>
<p>One of the methods for pattern classification is the k-nearest neighbor (k-NN) rule. It classifies each unlabeled object according to the majority label of its k-nearest neighbors in the training set. Despite its simplicity, the k-NN rule often yields competitive results and in certain domains, when cleverly combined with prior knowledge, it can help to solve even quite difficult classification tasks.</p>
<p>The result of k-NN classification depends significantly on the metric used to compute distances among different feature vectors. In (<xref ref-type="bibr" rid="B12">12</xref>), it was shown that using different distances for k-NN classification gives opportunity to decrease the error rates for different classification problems, such as face recognition, spoken letter recognition, and text categorization. It was also demonstrated that a k-NN classifier with correctly chosen distance metric shows better result, even when compared to SVM used for same classification tasks.</p>
<p>In this study, three most commonly used metrics, which are special cases if Minkowski distance, Eucledian, Cityblock, and Chebychev, were examined. Let us consider X as a 1-&#x000D7;-32 feature vector of a classified CDDM and Y as a feature vector of each CDDM in the training set. In our study, binary classifiers with three different distance metrics were developed. A classifier with an Eucledian metric distance between two points Xs and Yt, whose coordinates are values of X and Y, respectively, is defined as follows:</p>
<disp-formula id="E4"><label>(4)</label><mml:math id="M6"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msubsup><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mtext>&#x0200A;</mml:mtext></mml:mrow><mml:mrow><mml:mi>&#x02032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msup></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>For Cityblock (also known as Manhattan) metric:</p>
<disp-formula id="E5"><label>(5)</label><mml:math id="M7"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:munderover accentunder="false" accent="false"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mtext>&#x000A0;</mml:mtext><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:mo>|</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>where n is the size of vectors X and Y, and in our case <italic>n</italic> = 32&#x02013;number of features.</p>
<p>For Chebychev metric:</p>
<disp-formula id="E6"><label>(6)</label><mml:math id="M8"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo class="qopname">{</mml:mo><mml:mo>|</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo><mml:mo>}</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
</sec>
</sec>
<sec id="s3">
<title>Experimental Results</title>
<sec>
<title>Experiment Setup and Data Preparation</title>
<p>For this study, 2,142 CDDMs from 14 groups of patients with different heart states were used. These groups were the following: healthy volunteers (&#x0201C;NORM1&#x0201D; class) represented by 24 patients, sportsmen (&#x0201C;NORM2&#x0201D; class)&#x02212;36 patients, patients with myocardial damage&#x02013;six patients, patients with non-coronagenic diseases&#x02212;27 persons, male (21 patients) and female (18 patients) patients with microvascular disease, patients with ischemic heart disease, and patients with left ventricular hypertrophy, divided into five and three different groups depending on degree of pathology, where group &#x0201C;CAD 1&#x0201D; represents the lightest and &#x0201C;CAD 5&#x0201D; the hardest form of Ischemic heart disease, &#x0201C;LVH 1&#x0201D; the lightest, and &#x0201C;LVH 3&#x0201D; the hardest form of left ventricular hypertrophy. To group CAD 1 belong 21 persons, CAD 2&#x02212;19, CAD 3&#x02212;18, CAD 4&#x02212;9, CAD 5&#x02212;13, LVH 1&#x02212;10, LVH 2&#x02212;14, LVH 3&#x02212;11. Each patient in these groups is characterized by CDDMs of specific structure. The structure of CDDM in our understanding is the mutual location of zones with high and low density of currents.</p>
</sec>
<sec>
<title>Rules for Proceeding to the 2nd Stage of Classification</title>
<p>In order to design the 2nd stage of multistage classifier, the result of multiclass classification, which is the 1st stage of our multistage classifier, was analyzed. A map of resulting correlation coefficients and corresponding groups for each CDDM was ordered in a descending manner: the 1st group with the highest correlation value and 14th with the lowest. After that, we compared all these groups with actual group, to which CDDM belongs, to define the place of right group in the ordered set. The result of this analysis is shown in <xref ref-type="fig" rid="F2">Figure 2</xref>. As we can see, 86% of the right groups can be found among the first three groups with highest correlation coefficients. This information is significant for us, as it allows us to concentrate on the three groups with highest correlation in the 2nd stage of classification.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Distribution of the right group among predicted groups in set, ordered by correlation coefficient in descending order.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fmedt-03-779800-g0002.tif"/>
</fig>
<p>In our previous study, we presented a multiclass classifier that has, in general, good characteristics (<xref ref-type="bibr" rid="B9">9</xref>); however, classification showed poor precision for groups LVH1, LVH2, LVH3, CAD3, and NORMAL. It means a lot false positive results for these groups. At the same time, the classifier shows low sensitivity for the groups Microvascular disease (M), Microvascular disease (F), NORM2, Non-coronarogenic diseases, LVH2, CAD2, which means a lot of false negative results for these groups. Misclassifications of CDDMs from the above-mentioned groups with low precision or sensitivity dramatically affect the characteristics of the classifier in general, so the main goal of the 2nd stage of classification is to reduce number of false positive results for groups with low precision and the number of false negative results for groups with low sensitivity. To do that we analyzed the groups to which belongs CDDMs that are misclassified to groups with low precision and groups to which are misclassified CDDMs from groups with low sensitivity. The result of the analysis is shown in <xref ref-type="fig" rid="F3">Figures 3</xref>, <xref ref-type="fig" rid="F4">4</xref>.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Groups that are most often misclassified to: <bold>(A)</bold> LVH1, <bold>(B)</bold> LVH2, <bold>(C)</bold> LVH3, <bold>(D)</bold> IHD3, and <bold>(E)</bold> NORM1 using a multiclass classifier based on correlation analysis.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fmedt-03-779800-g0003.tif"/>
</fig>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p>Groups to which: <bold>(A)</bold> NORM2, <bold>(B)</bold> DIFFf, <bold>(C)</bold> DIFFm, <bold>(D)</bold> REUMO, <bold>(E)</bold> LVH2, and <bold>(F)</bold> IHD2 are misclassified most often using a multiclass classifier based on correlation analysis.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fmedt-03-779800-g0004.tif"/>
</fig>
<p>According to obtained results, the list of groups that are misclassified to groups with low precision most often was formed. These groups are presented in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Groups with low precision and corresponding groups that are misclassified to it most often.</p></caption>
<table frame="hsides" rules="groups">
<tbody><tr>
<td valign="top" align="left">LVH1</td>
<td valign="top" align="left">Myocardial damage, LVH2, Microvascular disease (M), NORM2</td>
</tr>
<tr>
<td valign="top" align="left">LVH2</td>
<td valign="top" align="left">NORM1, LVH1, Microvascular disease (F)</td>
</tr>
<tr>
<td valign="top" align="left">LVH3</td>
<td valign="top" align="left">CAD2, Microvascular disease (M), CAD3, NORM2</td>
</tr>
<tr>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Non-coronarogenic diseases, CAD2, Microvascular disease (M), Microvascular disease (F)</td>
</tr>
<tr>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">CAD1, LVH2, NORM2, Non-coronarogenic diseases</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>List of groups to which groups with low sensitivity are misclassified most often are presented in <xref ref-type="table" rid="T2">Table 2</xref>.</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Groups with low sensitivity and corresponding groups to which they are misclassified most often.</p></caption>
<table frame="hsides" rules="groups">
<tbody><tr>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="left">LVH1, LVH3, NORM1</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (F)</td>
<td valign="top" align="left">CAD4, LVH2</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (M)</td>
<td valign="top" align="left">CAD1, CAD3, NORM2</td>
</tr>
<tr>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="left">CAD1, CAD3, NORM1</td>
</tr>
<tr>
<td valign="top" align="left">LVH2</td>
<td valign="top" align="left">LVH1, NORM1</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">LVH2, LVH3, CAD3, CAD5</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The obtained result allows us to describe the rules for our two-stage classifier: 2nd stage of classification (k-NN classification) is needed if one of the conditions is met:</p>
<list list-type="simple">
<list-item><p>1) Group with the highest correlation belongs to one of the groups with low precision (LVH1, LVH2, LVH3, CAD3, or NORM1) and the 2nd or 3rd group belongs to one of the corresponding groups from in <xref ref-type="table" rid="T1">Table 1</xref>.</p></list-item>
<list-item><p>2) Group with the highest correlation belongs to one of the groups with low sensitivity [NORM2, Microvascular disease (F), Microvascular disease (M), NON-CORONAROGENIC DISEASES, LVH2, or CAD2] and the 2nd or 3rd group belongs to one of the corresponding groups in <xref ref-type="table" rid="T2">Table 2</xref>.</p></list-item>
</list>
</sec>
<sec>
<title>Feature Extraction and Parameter Definition for the 2nd Stage</title>
<p>In this study, for the 2nd stage, each CDDM is divided into four equal parts (quarters), as shown in <xref ref-type="fig" rid="F5">Figure 5</xref>.</p>
<fig id="F5" position="float">
<label>Figure 5</label>
<caption><p>Current density distribution map of patient with ischemic heart disease, divided into four parts.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fmedt-03-779800-g0005.tif"/>
</fig>
<p>Each element of CDDM has two parameters: brightness, which corresponds to the current density in a corresponding point, and angle of magnetic field vector in each point. For these two sets of data, in each quarter, the following characteristics were calculated: mean value of the elements, variance, kurtosis, and skewness of the elements. Thus, as each CDDM is divided into four parts, for which eight values are calculated (four for brightness and four for angles), each map has 32 features.</p>
<p>A k-NN classifier with three different metrics, described in the &#x0201C;k-Nearest Neighbor Algorithm&#x0201D; section, was applied to every pair of heart. This operation was made for different numbers of neighbors in the range of 1&#x02013;15, with the purpose of finding the optimal number of neighbors to obtain best performance characteristics. For cross-validation, 20 iterations of classification were made for each heart states pair with each metric and each value of nearest neighbors. In each iteration, from the general set of CDDMs, 280 CDDMs were taken, 20 for each group. These CDDMs formed the reference set. In the same way, in each iteration, an experimental set was formed. Such approach is caused by the limitations of the general set, related with different amounts of CDDMs in groups, so we had to take into account the group with minimal number of CDDMs to form a balanced sample of maps for the experiment. Binary classification was performed for each pair of CDDMs in each pair of groups representing the heart state from the experimental set by counting distance to each CDDM from corresponding groups in the reference set. Then, the decision on the group to which CDDM should be assigned is made based on prevailing group among a defined number of neighbors.</p>
<p>After the experiment, we obtained the best metric and NN parameter for each pair of groups. The result is shown in <xref ref-type="table" rid="T3">Table 3</xref>. For most of the cases, the best metric is Cityblock with NN = 1.</p>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p>Parameters for best performance of k-Nearest Neighbor (k-NN) classification for different group pairs.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Group 1</bold></th>
<th valign="top" align="left"><bold>Group 2</bold></th>
<th valign="top" align="left"><bold>Metric</bold></th>
<th valign="top" align="center"><bold>NN</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">LVH3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (M)</td>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">7</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (F)</td>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">4</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">11</td>
</tr>
<tr>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">CAD1</td>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="left">Eucledian</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (F)</td>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">10</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (M)</td>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">12</td>
</tr>
<tr>
<td valign="top" align="left">CAD1</td>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">Chebyshev</td>
<td valign="top" align="center">7</td>
</tr>
<tr>
<td valign="top" align="left">LVH2</td>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">LVH1</td>
<td valign="top" align="left">LVH3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">LVH3</td>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">7</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">CAD4</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">4</td>
</tr>
<tr>
<td valign="top" align="left">CAD4</td>
<td valign="top" align="left">CAD5</td>
<td valign="top" align="left">Chebyshev</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="left">LVH1</td>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">LVH1</td>
<td valign="top" align="left">Myocardial damage</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">Myocardial damage</td>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="left">Manhattan</td>
<td valign="top" align="center">5</td>
</tr>
<tr>
<td valign="top" align="center" colspan="2">OTHER PAIRS</td>
<td valign="top" align="left">Cityblock</td>
<td valign="top" align="left">1</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec>
<title>Experiment Setup</title>
<p>After analysis and definitions of rules and best parameters for each stage, 2-stage classifier can be designed. Classification of each CDDM will consist of the following steps:</p>
<list list-type="simple">
<list-item><p>1) First stage: multiclass classification by correlation analysis, as described above. As a result, a set of groups with corresponding correlation, sorted in descending order by correlation coefficient, is formed. After that, depending on the result, there are three possible options:</p>
<list list-type="simple">
<list-item><p>- group with the highest correlation belongs (1st in result set) to one of the groups with low precision (LVH1, LVH2, LVH3, CAD3, or NORM1), and the 2nd or 3rd group belongs to one of the corresponding groups in <xref ref-type="table" rid="T1">Table 1</xref> &#x02013; proceed to 2nd stage of classification;</p></list-item>
<list-item><p>- group with the highest correlation belongs to one of the groups with low sensitivity [NORM2, Microvascular disease (F), Microvascular disease (M), Non-coronarogenic diseases, LVH2, or CAD2] and the 2nd or 3rd group belongs to one of the corresponding groups in <xref ref-type="table" rid="T2">Table 2</xref>&#x02014;proceed to 2nd stage of classification;</p></list-item>
<list-item><p>- all other cases&#x02212;2<sup>nd</sup> stage is not needed. CDDM is classified to group with the highest correlation coefficient.</p></list-item>
</list></list-item>
<list-item><p>3) Second stage: If the 1st stage shows that additional classification is needed, k-NN classification is performed between 1st group in set and 2nd or 3rd using the corresponding parameters for this pair. After that, CDDM is classified by the result of the k-NN classification.</p></list-item>
</list>
<p>For cross-validation, 20 iterations of classification were made for each heart states pair with each metric and each value of nearest neighbors. In each iteration from the general set of CDDMs, 280 CDDMs were taken, 20 for each group. These CDDMs formed the reference set. In the same way, in each iteration, an experimental set was formed.</p>
<p>To evaluate the classification result, the following parameters were used for each group using 1-vs-all strategy: sensitivity (TPR), specificity (SPC), precision (PPV), and accuracy (ACC). These values are defined as follows:</p>
<disp-formula id="E7"><label>(7)</label><mml:math id="M9"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mi>R</mml:mi><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>P</mml:mi></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E8"><label>(8)</label><mml:math id="M10"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>S</mml:mi><mml:mi>P</mml:mi><mml:mi>C</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E9"><label>(9)</label><mml:math id="M11"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>P</mml:mi><mml:mi>P</mml:mi><mml:mi>V</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>F</mml:mi><mml:mi>P</mml:mi></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E10"><label>(10)</label><mml:math id="M12"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>A</mml:mi><mml:mi>C</mml:mi><mml:mi>C</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>T</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mrow><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>where TP is the number of CDDMs of persons with heart failure identified correctly; TN is the number of CDDMs of persons without heart failure identified correctly; P is the total amount of CDDMs of persons with heart failure; N is the total amount of CDDMs of persons without heart failure.</p>
<p>After all iterations, the mean value of the characteristic parameters for each classifier with a different number of neighbor value was counted.</p>
<p>Average accuracy was counted to evaluate the overall performance of the classifier (<xref ref-type="bibr" rid="B14">14</xref>):</p>
<disp-formula id="E11"><label>(11)</label><mml:math id="M13"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>A</mml:mi><mml:mi>C</mml:mi><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>A</mml:mi><mml:mi>V</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mstyle displaystyle="true"><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mtext>&#x000A0;</mml:mtext><mml:mo>=</mml:mo><mml:mtext>&#x000A0;</mml:mtext><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:mfrac><mml:mrow><mml:mi>t</mml:mi><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0002B;</mml:mo><mml:mi>t</mml:mi><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0002B;</mml:mo><mml:mi>t</mml:mi><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0002B;</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0002B;</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow><mml:mrow><mml:mi>l</mml:mi></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>where <italic>tp</italic><sub><italic>i</italic></sub> is the true positive counts, <italic>tn</italic><sub><italic>i</italic></sub> is the true negative counts, <italic>fp</italic><sub><italic>i</italic></sub> is the false positive counts, <italic>fn</italic><sub><italic>i</italic></sub> is the false negative counts, and <italic>l</italic> is the number of classes (14 in our case).</p>
</sec>
<sec>
<title>Experimental Results and Discussion</title>
<p>The averaged characteristic values for each group of the described experiment are presented in <xref ref-type="table" rid="T4">Table 4</xref>.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p>Averaged two-stage classification characteristic values for each group.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Group</bold></th>
<th valign="top" align="center"><bold>Accuracy</bold></th>
<th valign="top" align="center"><bold>Precision</bold></th>
<th valign="top" align="center"><bold>Sensitivity</bold></th>
<th valign="top" align="center"><bold>Specificity</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">LVH1</td>
<td valign="top" align="center">0.955</td>
<td valign="top" align="center">0.629</td>
<td valign="top" align="center">0.900</td>
<td valign="top" align="center">0.959</td>
</tr>
<tr>
<td valign="top" align="left">LVH3</td>
<td valign="top" align="center">0.960</td>
<td valign="top" align="center">0.666</td>
<td valign="top" align="center">0.873</td>
<td valign="top" align="center">0.966</td>
</tr>
<tr>
<td valign="top" align="left">Myocardial damage</td>
<td valign="top" align="center">0.979</td>
<td valign="top" align="center">0.848</td>
<td valign="top" align="center">0.863</td>
<td valign="top" align="center">0.988</td>
</tr>
<tr>
<td valign="top" align="left">CAD3</td>
<td valign="top" align="center">0.947</td>
<td valign="top" align="center">0.605</td>
<td valign="top" align="center">0.755</td>
<td valign="top" align="center">0.962</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (M)</td>
<td valign="top" align="center">0.938</td>
<td valign="top" align="center">0.629</td>
<td valign="top" align="center">0.310</td>
<td valign="top" align="center">0.986</td>
</tr>
<tr>
<td valign="top" align="left">CAD5</td>
<td valign="top" align="center">0.967</td>
<td valign="top" align="center">0.760</td>
<td valign="top" align="center">0.790</td>
<td valign="top" align="center">0.981</td>
</tr>
<tr>
<td valign="top" align="left">NORM2</td>
<td valign="top" align="center">0.958</td>
<td valign="top" align="center">0.724</td>
<td valign="top" align="center">0.655</td>
<td valign="top" align="center">0.981</td>
</tr>
<tr>
<td valign="top" align="left">Microvascular disease (F)</td>
<td valign="top" align="center">0.952</td>
<td valign="top" align="center">0.753</td>
<td valign="top" align="center">0.488</td>
<td valign="top" align="center">0.988</td>
</tr>
<tr>
<td valign="top" align="left">CAD2</td>
<td valign="top" align="center">0.956</td>
<td valign="top" align="center">0.742</td>
<td valign="top" align="center">0.590</td>
<td valign="top" align="center">0.984</td>
</tr>
<tr>
<td valign="top" align="left">CAD1</td>
<td valign="top" align="center">0.965</td>
<td valign="top" align="center">0.811</td>
<td valign="top" align="center">0.665</td>
<td valign="top" align="center">0.988</td>
</tr>
<tr>
<td valign="top" align="left">Non-coronarogenic diseases</td>
<td valign="top" align="center">0.957</td>
<td valign="top" align="center">0.722</td>
<td valign="top" align="center">0.650</td>
<td valign="top" align="center">0.981</td>
</tr>
<tr>
<td valign="top" align="left">CAD4</td>
<td valign="top" align="center">0.971</td>
<td valign="top" align="center">0.758</td>
<td valign="top" align="center">0.875</td>
<td valign="top" align="center">0.978</td>
</tr>
<tr>
<td valign="top" align="left">LVH2</td>
<td valign="top" align="center">0.949</td>
<td valign="top" align="center">0.633</td>
<td valign="top" align="center">0.695</td>
<td valign="top" align="center">0.969</td>
</tr>
<tr>
<td valign="top" align="left">NORM1</td>
<td valign="top" align="center">0.943</td>
<td valign="top" align="center">0.589</td>
<td valign="top" align="center">0.673</td>
<td valign="top" align="center">0.964</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>As can be seen from the result, the average accuracy of classification is 0.96, average specificity is equal to 0.98, and both average precision and sensitivity are equal to 0.7. Comparing the obtained parameters of classification with the multiclass classifier described in (<xref ref-type="bibr" rid="B9">9</xref>), all the parameters are higher in the case of using a two-stage classifier. Most significant increase showed sensitivity: average value is 6.4% higher. At the same time, for some of the groups, increase is even more substantial: 14.5% for the Myocardial damage group, 16.3% Microvascular disease (M), 10% for NORM2, 9.5% for Microvascular disease (F), and 12% for the Non-coronarogenic diseases group. A similar result was obtained for precision: average value is 6.8%, which is higher compared to the value obtained using a one-stage classifier. Performing two-stage classification allowed us to significantly increase the precision for two groups that had very low value: the LVH1 group by 11% and the LVH2 group by 11%.</p>
</sec>
</sec>
<sec sec-type="conclusions" id="s4">
<title>Conclusions</title>
<p>Summing up the result during the study, we can conclude that the proposed method of two-stage classification allows to improve the performance of a multiclass classifier based on correlation analysis by applying k-NN classification in determined cases with most suitable parameters. The designed two-stage classifier shows an average accuracy equal to 0.96, average specificity was 0.98, and both average precision and sensitivity are equal to 0.7. The proposed method allows to solve the problems of our previous classifier, described in (<xref ref-type="bibr" rid="B9">9</xref>), which are low precision for the LVH1, LVH2, LVH3, CAD3, and NORM1 groups, and low sensitivity for the NORM2, Microvascular disease (F), Microvascular disease (M), Non-coronarogenic diseases, LVH2, and CAD2 groups, increasing the corresponding values by up to 16%. Although the proposed method shows quite a good result, it can be improved even more by applying some CDDM preprocessing techniques or different features for the 2nd stage.</p>
<p>The proposed method of classification can help a physician to define the state of patient&#x00027;s cardiovascular system.</p>
</sec>
<sec sec-type="data-availability" id="s5">
<title>Data Availability Statement</title>
<p>The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.</p>
</sec>
<sec id="s6">
<title>Ethics Statement</title>
<p>The studies involving human participants were reviewed and approved by Commission on Ethics of National Military Medical Clinical Center &#x0201C;Main Military Clinical Hospital of Ukraine&#x0201D;. The patients/participants provided their written informed consent to participate in this study.</p>
</sec>
<sec id="s7">
<title>Author Contributions</title>
<p>YU: method development and realization, data analysis, and experiment result analysis. AP: method review, revising mathematical background for classification approaches, experiment result analysis, and approval of obtained results from technical and mathematical side. IC: providing medical data, method review, revising medical side of data analysis, and approval of obtained results and their readiness for publication. All authors contributed to the article and approved the submitted version.</p>
</sec>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of Interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s8">
<title>Publisher&#x00027;s Note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec> </body>
<back>
<ref-list>
<title>References</title>
<ref id="B1">
<label>1.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chaikovsky</surname> <given-names>I</given-names></name> <name><surname>Boichak</surname> <given-names>M</given-names></name> <name><surname>Sosnitskii</surname> <given-names>V</given-names></name> <name><surname>Miasnikov</surname> <given-names>G</given-names></name> <name><surname>Rykhlik</surname> <given-names>E</given-names></name> <name><surname>Sosnitskaia</surname> <given-names>T</given-names></name> <etal/></person-group>. <article-title>Magnetocardiography in clinical practice: algorithms and technologies for data analysis</article-title>. <source>Med Sci.</source> (<year>2011</year>) <volume>3&#x02013;4</volume>:<fpage>21</fpage>&#x02013;<lpage>38</lpage>.<pub-id pub-id-type="pmid">22416359</pub-id></citation></ref>
<ref id="B2">
<label>2.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kobayashi</surname> <given-names>K</given-names></name> <name><surname>Uchikawa</surname> <given-names>Y</given-names></name> <name><surname>Nakai</surname> <given-names>K</given-names></name> <name><surname>Yoshizawa</surname> <given-names>M</given-names></name></person-group>. <article-title>Visualization of the current-density distributionfor mcg with wpw syndrome patients using independent component analysis</article-title>. <source>IEEE Trans Magn.</source> (<year>2004</year>) <volume>40</volume>:<fpage>2970</fpage>&#x02013;<lpage>2</lpage>. <pub-id pub-id-type="doi">10.1109/TMAG.2004.828990</pub-id><pub-id pub-id-type="pmid">27295638</pub-id></citation></ref>
<ref id="B3">
<label>3.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Brockmeier</surname> <given-names>K</given-names></name> <name><surname>Schmitz</surname> <given-names>L</given-names></name> <name><surname>Bobadilla Chavez</surname> <given-names>JD</given-names></name> <name><surname>Burghoff</surname> <given-names>M</given-names></name> <name><surname>Koch</surname> <given-names>H</given-names></name> <etal/></person-group>. <article-title>Magnetocardiography and 32-lead potential mapping: repolarization in normal subjesct during pharmacologically induced stress</article-title>. <source>J Cardiovasc Electrophysiol.</source> (<year>1999</year>) <volume>8</volume>:<fpage>615</fpage>&#x02013;<lpage>26</lpage>. <pub-id pub-id-type="doi">10.1111/j.1540-8167.1997.tb01824.x</pub-id><pub-id pub-id-type="pmid">9209962</pub-id></citation></ref>
<ref id="B4">
<label>4.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tsukada</surname> <given-names>K</given-names></name> <name><surname>Miyashita</surname> <given-names>T</given-names></name> <name><surname>Kandori</surname> <given-names>A</given-names></name> <name><surname>Yamada</surname> <given-names>S</given-names></name> <name><surname>Sato</surname> <given-names>M</given-names></name> <name><surname>Terada</surname> <given-names>Y</given-names></name> <etal/></person-group>. <article-title>Magnetocardiographic mapping characteristic for diagnosis of ischemic heart disease</article-title>. <source>Comput Cardiol.</source> (<year>2000</year>) <volume>27</volume>:<fpage>505</fpage>&#x02013;<lpage>8</lpage>. <pub-id pub-id-type="doi">10.1109/CIC.2000.898569</pub-id><pub-id pub-id-type="pmid">27295638</pub-id></citation></ref>
<ref id="B5">
<label>5.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jazbinsek</surname> <given-names>V</given-names></name> <name><surname>Burghoff</surname> <given-names>M</given-names></name> <name><surname>Oeff</surname> <given-names>M</given-names></name> <name><surname>Ranze</surname> <given-names>O</given-names></name> <name><surname>Trontelj</surname> <given-names>Z</given-names></name> <etal/></person-group>. <article-title>Magnetocardiographic localization of accessory conduction pathway in patients suffering from WPW syndrome</article-title>. In: <source>Computers in Cardiology</source>. Vienna (<year>1995</year>), pp. <fpage>417</fpage>&#x02013;<lpage>20</lpage>.</citation>
</ref>
<ref id="B6">
<label>6.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fainzilberg</surname> <given-names>L</given-names></name></person-group>. <article-title>Chaikovsky, Auth-Eisernitz S, Awolin B, Ivaschenko D, Hailer B. Sensitivity and specificity of magnetocardiography, using computerized classification of current density vectors maps, in ischemic patients with normal ECG and echocardiogram</article-title>. <source>Int Congr Ser.</source> (<year>2007</year>) <volume>1300</volume>:<fpage>468</fpage>&#x02013;<lpage>71</lpage>. <pub-id pub-id-type="doi">10.1016/j.ics.2007.01.042</pub-id></citation>
</ref>
<ref id="B7">
<label>7.</label>
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Chaikovsky</surname> <given-names>I</given-names></name> <name><surname>Kohler</surname> <given-names>J</given-names></name> <name><surname>Hecker</surname> <given-names>Th</given-names></name> <name><surname>Hailer</surname> <given-names>B</given-names></name> <name><surname>Auth- Eisernitz</surname> <given-names>S</given-names></name> <name><surname>Sosnytsky</surname> <given-names>V</given-names></name> <etal/></person-group>. <article-title>Detection of coronary artery disease in patients with normal or unspecifically changed ECG on the basis of magnetocardiography</article-title>. In: <source>Proceedings of the 12-th International Conference on Biomagnetism</source>. <publisher-loc>Espoo</publisher-loc> (<year>2000</year>), pp. <fpage>565</fpage>&#x02013;<lpage>8</lpage>.</citation>
</ref>
<ref id="B8">
<label>8.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovskyi</surname> <given-names>I</given-names></name></person-group>. <article-title>Multiclass classification of current dencity distribution maps</article-title>. <source>Sci Notes Taurida Natl VI Vernadsky Univ Ser Techn Sci.</source> (<year>2018</year>) <volume>29</volume>:<fpage>133</fpage>&#x02013;<lpage>7</lpage>.</citation>
</ref>
<ref id="B9">
<label>9.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovskyi</surname> <given-names>I</given-names></name></person-group>. <article-title>Method of current density distribution maps classification based on correlation analysis</article-title>. <source>Sci Notes Taurida Natl VI Vernadsky Univ Ser Techn Sci.</source> (<year>2018</year>) <volume>29</volume>:<fpage>189</fpage>&#x02013;<lpage>93</lpage>.</citation>
</ref>
<ref id="B10">
<label>10.</label>
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovskyi</surname> <given-names>I</given-names></name></person-group>. <article-title>Ischemic heart disease recognition by k-NN classification of current density distribution maps</article-title>. In: <source>IEEE 35th International Conference on Electronics and Nanotechnology (ELNANO) Proceedings</source>. <publisher-loc>Kyiv</publisher-loc> (<year>2015</year>), pp. <fpage>402</fpage>&#x02013;<lpage>5</lpage>.</citation>
</ref>
<ref id="B11">
<label>11.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovsky</surname> <given-names>I</given-names></name></person-group>. <article-title>Binary classification of heart failures using k-NN with various distance metrics</article-title>. <source>Int J Electron Telecommun.</source> (<year>2015</year>) <volume>61</volume>:<fpage>339</fpage>&#x02013;<lpage>44</lpage>. <pub-id pub-id-type="doi">10.2478/eletel-2015-0044</pub-id></citation>
</ref>
<ref id="B12">
<label>12.</label>
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovsky</surname> <given-names>I</given-names></name></person-group>. <article-title>k-NN binary classification of heart failures using myocardial current density distribution maps</article-title>. In: <source>Signal Processing Symposium (SPSympo)</source>. <publisher-loc>Debe</publisher-loc> (<year>2015</year>), <fpage>98</fpage>&#x02013;<lpage>102</lpage>. <pub-id pub-id-type="doi">10.1109/SPS.2015.7168283</pub-id><pub-id pub-id-type="pmid">27295638</pub-id></citation></ref>
<ref id="B13">
<label>13.</label>
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Udovychenko</surname> <given-names>Y</given-names></name> <name><surname>Popov</surname> <given-names>A</given-names></name> <name><surname>Chaikovsky</surname> <given-names>I</given-names></name></person-group>. <article-title>Current density distribution maps threshold processing</article-title>. In: <source>2014 IEEE 34th International Scientific Conference on Electronics and Nanotechnology (ELNANO)</source>. <publisher-loc>Kyiv</publisher-loc> (<year>2014</year>), pp. <fpage>313</fpage>&#x02013;<lpage>5</lpage>.<pub-id pub-id-type="pmid">15344484</pub-id></citation></ref>
<ref id="B14">
<label>14.</label>
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sokolova</surname> <given-names>M</given-names></name> <name><surname>Lapalme</surname> <given-names>GA</given-names></name></person-group>. <article-title>systematic analysis of performance measures for classification tasks</article-title>. <source>Inf Process Manag.</source> (<year>2009</year>) <volume>45</volume>:<fpage>427</fpage>&#x02013;<lpage>37</lpage>. <pub-id pub-id-type="doi">10.1016/j.ipm.2009.03.002</pub-id><pub-id pub-id-type="pmid">32003740</pub-id></citation></ref>
</ref-list>
</back>
</article>