# AI-Based Classification of Pediatric Breath Sounds: Toward a Tool for Early Respiratory Screening
## 5 Classification
### Artificial Neural Network (ANN)  
An artificial neural network (ANN) is a computational model inspired by the brain's synaptic connections, designed to process information. It consists of numerous nodes (or neurons), each representing a specific output function known as the activation function. The connections between nodes, called synaptic weights, define the relationship between them. The output of an ANN depends on how the nodes are connected, the connection weights, and the activation function. Key characteristics of ANNs include their ability to learn from examples and generalize results through the activation function. During the training process, the knowledge learned is stored in the synaptic weights of the neurons [50].  
For breath sound signals with different causes, it is assumed that they exhibit distinct feature patterns. By learning from various breath sounds, ANNs can classify them into different categories, storing these feature patterns as \"codebooks.\" When an unknown breath sound is presented, it can be recognized by comparing its features to the stored \"codebooks,\" thereby classifying the cause it belongs to.  
Self-organizing ANNs can evaluate input patterns, organize themselves to learn from the collective input set, and categorize similar patterns into groups [50]. Self-organized learning typically involves frequent adjustments to the network's synaptic weights based on the input patterns [50]. One such self-organizing network model is Linear Vector Quantization (LVQ), a feed-forward ANN widely used in pattern recognition and optimization tasks. LVQ can be effectively applied to classify different causes of breath sounds.  
the next state depends solely on the current state [26]. The transitions between states are governed by state transition probabilities, defined as follows:  
\[a_{ij}=P[q_{t}=s_{j}\mid q_{t-1}=s_{i}],1\leq i,j\leq N \tag{46}\]  
where \(s_{i}\) is state \(i\) of \(N\) states; \(a_{ij}\) is an element of the state transition matrix \(\mathbf{A}\). The state transition coefficients \(a_{ij}\) are non-negative, so  
\[\sum_{j}^{N}a_{ij}=1,1\leq i\leq N \tag{47}\]  
The observation symbol probability distribution in state \(j\), \(B=\{b_{j}(k)\}\), where  
\[b_{j}(k)=P[v_{k}\text{ at }t\mid q_{t}=s_{j}],1\leq j\leq N,1\leq k\leq M \tag{48}\]  
here, \(M\) provides the value of distinct observation symbols per state; \(v_{k}\) is the individual symbols. The initial state distribution is given by \(\pi=\{\pi_{i}\}\), where \(\pi_{i}\) is the probability of the initial state \(q_{1}\) being in the state \(i\)  
\[\pi_{i}=P[q_{1}=s_{i}],1\leq i\leq N. \tag{49}\]  
A hidden Markov model (HMM) is an extension of a Markov model in which the states themselves are not directly observable. Instead, only the output generated by the system--known as the observation sequence--is available for analysis [46]. Based on the underlying HMM framework, once suitable values are assigned to the number of states \(N\), the number of distinct observation symbols \(M\), the state transition matrix \(\mathbf{A}\), the observation probability distribution \(B\), and the initial state distribution \(\pi\), the HMM can function as a probabilistic generator capable of producing observation sequences:  
\[O=O_{1}O_{2}\cdots O_{T} \tag{50}\]  
where \(O_{T}\) represents symbols from \(v_{k}\); \(T\) is the value of the observations in the sequence:  
1. Choose an initial state \(q_{1}=s_{i}\) according to the initial state distribution \(\pi\), which is set to \(\frac{1}{3}\) in this research.
2. Set \(t=1\).
3. Select the observation \(O_{t}=v_{k}\) based on the symbol probability distribution \(b_{i}(k)\) for the current state \(s_{i}\).
4. Transition to the next state \(q_{t+1}=s_{j}\) using the state transition probability distribution \(a_{ij}\) from state \(s_{i}\).
5. Set \(t=t+1\); repeat step 3 if \(t<T\). Otherwise, end the procedure.