<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Intelligent Discriminant Diagnosis of Heart Disease Cases</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Qi Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guici Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Wuhan University of Science and Technology</institution>
          ,
          <addr-line>Wuhan, Hubei; 430065</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <fpage>21</fpage>
      <lpage>23</lpage>
      <abstract>
        <p>The application of artificial intelligence in the medical field has greatly alleviated the contradiction between people's growing demand for medical resources and the actual shortage of medical resources. In this paper, the combination of Fisher dimension reduction and Hidden Markov Model (HMM) is applied to the intelligent diagnosis of heart disease cases. The index sequence of heart disease cases was simplified by Fisher dimension reduction. The HMM of heart disease and non-heart disease is established by Baum-Welch algorithm. The matching score between the observation sequence and the two HMM is calculated by the Forward-Backward algorithm. The experimental results show that the diagnosis of heart disease cases by matching scores is reliable.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Fisher dimension reduction</kwd>
        <kwd>HMM</kwd>
        <kwd>heart disease diagnosis</kwd>
        <kwd>classification</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>2.Data Processing</title>
      <p>accounting for 47.65%, and 390 groups of patients without heart disease, accounting for 52.35%.
Then, the data is deconstructed and mapped. The processed data is shown in Table 1.
1 (MaxHR is within the range of its average +/-2*variance), 0 (Otherwise)
1 (ExerciseAngina = Yes), 0 (ExerciseAngina = No)
1 (Oldpeak &gt; 0.5), 0 (Otherwise)
1 (ST_Slope = Up), 0 (Otherwise)
1 (ST_Slope = Flat), 0 (Otherwise)
1 (ST_Slope = Dowm), 0 (Otherwise)
output class [1: heart disease, 0: Normal]</p>
    </sec>
    <sec id="sec-2">
      <title>3. Combining HMM and Fisher's diagnostic model</title>
    </sec>
    <sec id="sec-3">
      <title>3.1. Fisher dimension reduction</title>
      <p>classificatio
inter-class distance 
new subspace are guaranteed.</p>
      <p />
      <p>There are 19 groups of data indicators after deconstruction and mapping. To reduce the time
complexity and space complexity, we use the Fisher dimension reduction method to extract significant
features and simplify the prediction indicators. Fisher's idea of dimensionality reduction is to project
high-dimensional pattern samples into the optimal discriminant vector space ω to extract
-n information and compress the dimension of feature space. After projection, the maximum
and the minimum intra-class distance   
of pattern samples in the

= ∑∈

= (
( − 
−  )(
)( − 
−  ) , 
) +∑∈</p>
      <p>=
( − 
∑∈</p>
      <p>
        ,
)( − 
) ,
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
The best projection direction ω is the direction that makes 
  /
 
maximum. Here, the
Lagrange multiplier method uses to solve the best projection direction and obtains the discriminant
function y = ω x
      </p>
    </sec>
    <sec id="sec-4">
      <title>3.2. Baum-Welch algorithm for solving HMM parameters</title>
      <p>
        To establish HMM with heart disease and non-heart disease, we first need to obtain its parameter
λ = (A, B, Π). A is the state transition matrix composed of 
; B is the observation-generated
probability matrix composed of  (), and
Π is the initial state probability distribution. First, get the
numerical sequence of ST_Slope UP, ASY, ExerciseAngia, Sex, and RestingBP input into the HMM
and the randomly given parameter π , a , b (k). Then calculate  (, ), 
() to update the model
parameters.  (, ) describes the probability that t is in state 
and t+1 is in state 
 () describes the probability that t is in state q at time t, whic h are recorded as:
at time t, and
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
(7)
(8)
(9)
(10)
Then update the model parameters,
 (, ) =
 () =
      </p>
      <p>() =
()
=
=
∑
∑
∑
∑
∑
∑</p>
      <p>(
(|)</p>
      <p>)
() ()
() ()
() ,
,
() () ,
∑
∑
∑
∑
,
()
() (,) ,
() ()
() ()
() ()
,
non-heart disease are trained by the Baum-Welch algorithm.</p>
      <p>If the value has converged, the algorithm ends, otherwise, continues to iterate. The parameter λ =
(A , B , Π ) of the HMM of heart disease and the parameter λ = (A , B , Π )of the HMM of
3.3. Forward-Backward algorithm to distinguish the category
(|)
matching score p(O| ) ( i=0,1) between the observation index sequence O and the two models.
Compare the score size, and determine the category of the observation index sequence.The first step
of the Forward algorithm is to calculate the forward probability 
()
of each state at time 1, the
second step is to calculate the forward probability 
() at times 2, 3,..., T, and finally calculate
 () =   ( )</p>
      <p>,

() = ( ∑
(|) =
 ()
∑</p>
      <p>) (
 () ,
)</p>
      <p>The Backward algorithm is the reverse process of the forward algorithm, so I won't repeat it here.</p>
    </sec>
    <sec id="sec-5">
      <title>4.Model experiment test</title>
      <p>Through the Fisher discriminant function, we extracted 5 significant indicators from the original
19 groups of indicator data. At the same time, the ranking of the importance of the five indicators is
ST_ Slope UP&gt;ASY &gt; ExerciseAngina&gt; Sex &gt; RestingBP.</p>
      <p>To unify the input length of the index series, we add five opposite indexes to the observation index
series of the HMM. Therefore, the observation index series of the HMM includes RestingBP high,
RestingBP normal,</p>
      <p>Male, Female, ChestPainType yes, ChestPainType as, ExerciseAngia yes,
ExerciseAngia no, ST_ Slope-up, ST_ Ten indicators of Slope Flat Down. We select 80% of the
observation index sequence data of all data sets as the training set to input the HMM. The model
parameters are obtained by the Baum-Welch algorithm.</p>
      <p>Four groups of observation index sequences are selected and the matching scores calculated by the
Forward-Backward algorithm are shown in Figure 1. Through Figure 1, we can see that the matching
scores of the same index sequence under different models have certain differences, which shows that
the validity of observation sequence data can be judged by matching scores.
0.0004
0.0003
HeartDisease</p>
      <p>Non HeartDisease</p>
      <p>HeartDisease</p>
      <p>Non HeartDisease
Index series 3</p>
      <p>Index series 4</p>
      <p>We take all the data as the validation set, and diagnosed the heart disease cases through the
matching score between the observation index sequence and HMM, and the overall accuracy was
85.9%. To further verify the reliability of the model. We used ANN and Decision Tree to diagnose
heart disease cases after data processing. The overall accuracy of ANN and Decision Tree was 84.3%
and 82.5%. The detailed classification results of the three models are shown in Table 2 (the model
proposed in this paper is abbreviated as F-H).</p>
      <p>From Table 2, we can see that among the three models, 92.39% of the F-H model, 87.18% of the
decision tree model, and 85.47% of the ANN model have the highest diagnostic accuracy. The highest
diagnostic accuracy of non-heart disease was 83.46% in the ANN model, 80% in the F-H model, and
78.29% in the Decision Tree model.</p>
    </sec>
    <sec id="sec-6">
      <title>5. Result analysis and summary</title>
      <p>We deconstruct and map the original 11 groups of index data, expand the data to 19 groups, and
then extract the important features that determine heart disease from the data indicators through Fisher
dimension reduction ST_ Slope UP, ChestPainType ASY, ExerciseAngia, Sex, RestingBP, and their
importance ranking. Finally, the overall accuracy of the classification identified by HMM is 85.9%.
Next, we will make some simple analysis of the results. We counted the number of patients with heart
disease and non heart disease under several observation indicators, as shown in Table 3.</p>
      <p>From Table 3, we can see that under the same observation index sequence, the number of patients
with heart disease is equivalent to the number of non-heart patients. It leads to that even if the model
parameters can fully fit the characteristics of the training data set, the accuracy of discrimination will
not reach a very high level. It also shows that the original indicators cannot completely and accurately
depict the characteristics of the heart disease population.
ST_Slope-Flat-Down，ChestPainType yes,
ExerciseAngina no, Male, RestingBP normal
ST_Slope-Flat-Down，ChestPainType yes,
ExerciseAngina yes, Male, RestingBP normal
ST_Slope-Up，ChestPainType no,
ExerciseAngina no, Male, RestingBP normal
ST_Slope-Flat-Down，ChestPainType yes,
ExerciseAngina no, Male, RestingBP high
ST_Slope-Flat-Down，ChestPainType no,
ExerciseAngina yes, Female, RestingBP normal
25
20
10
9
12</p>
    </sec>
    <sec id="sec-7">
      <title>6.Acknowledgements</title>
    </sec>
    <sec id="sec-8">
      <title>7.References</title>
      <p>Thanks to the teachers, classmates, friends, and family who contributed to this article.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Wang</given-names>
            <surname>Tingting</surname>
          </string-name>
          , Xing Dengxiang.
          <article-title>Research on the progress of artificial intelligence in medical applications</article-title>
          ,
          <source>J. Trauma and Critical Care Medicine</source>
          , (
          <year>2021</year>
          ).doi:
          <volume>10</volume>
          .16048/j.issn.2095-
          <volume>5561</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Gong</given-names>
            <surname>Gao</surname>
          </string-name>
          , Huang Wenhua, Cao Shi, Chen Chaomin,.
          <article-title>Research progress in the application of artificial intelligence in medicine J</article-title>
          .
          <source>Chinese Journal of Medical Physics</source>
          , (
          <year>2021</year>
          ):
          <fpage>1044</fpage>
          -
          <lpage>1047</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.A.Qiu</given-names>
            <surname>Shuang</surname>
          </string-name>
          .
          <article-title>Application of artificial intelligence diagnosis system based on DE Light framework in breast ultrasound</article-title>
          ,
          <source>Master's thesis</source>
          , University of Electronic Science and Technology of China, Chengdu, China,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Zong</surname>
            <given-names>Changfu</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            <given-names>Xiao</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            <given-names>Chang</given-names>
          </string-name>
          , Zhang Guangcai.
          <article-title>Driver's driving intention identification and behavior prediction during vehicle steering J</article-title>
          . Journal of Jilin University (Engineering Edition), (
          <year>2009</year>
          )
          <fpage>27</fpage>
          -
          <lpage>32</lpage>
          . doi:
          <volume>10</volume>
          .13229/j.
          <source>cnki.jdxbgxb2009.s1.023</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Sergios</given-names>
            <surname>Theodoridis</surname>
          </string-name>
          ,
          <article-title>Machine Learning (Second Edition),Chapter 7 - Classification: a Tour of the Classics, Editor(s): Sergios TheodOrid</article-title>
          , Academic Press,
          <year>2020</year>
          , Pages
          <fpage>301</fpage>
          -350, doi:10.1016/B978-0
          <source>-12-818803-3</source>
          .
          <fpage>00016</fpage>
          -
          <lpage>7</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Shoba</given-names>
            <surname>Ranganathan</surname>
          </string-name>
          , Encyclopedia of Bioinformatics and Computat-ional
          <string-name>
            <surname>Biology</surname>
          </string-name>
          ,Hidden Markov Models, Monica Franzese, Antonella Iuliano, Academic Press,
          <year>2019</year>
          ,Pages
          <fpage>753</fpage>
          -762, doi:10.1016/B978-0
          <source>-12-809633-8</source>
          .
          <fpage>20488</fpage>
          -
          <lpage>3</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>