## 2 Inference Methods
### The Structure and Algorithm of a Bayesian Network  
The Bayesian theory can be described as Equation (1) below.  
\[P(X|Y)=\frac{P(XY)}{P(Y)}=\frac{P(X)P(Y|X)}{P(Y)} \tag{1}\]  
where \(X\) and \(Y\) are given events and are independent of each other. For a set of events \(Y_{i}\), the probability of \(X\) based on the conditional probability of \(Y\) is  
\[P(X)=\sum_{i=1}^{n}P(Y_{i})P(\,X|Y_{i}) \tag{2}\]  
The probability of \(P(Y_{i}|X)\) can be derived using Equation (3).  
\[P(Y_{i}|X)=\frac{P(XY_{i})}{P(X)}=\frac{P(Y_{i})P(\,X|Y_{i})}{\sum_{i=1}^{n}P( Y_{i})P(X|Y_{i})} \tag{3}\]  
The conditional probability of \(Y_{i}\) can be calculated with the prior probability and the independence probability.  
After the cores of the data classification sample are determined, the distance from the sampled data to the core data can be used to represent the probability of being divided into related core points for the collected new data. In order to process that, the number of iterations for dimensionality reduction and the reduction target should be set after the input of a multidimensional data sample. Based on the equations given by [PERSON] [41], the weight \(\omega\) can be obtained using the equation  
\[\omega=\left\{\begin{aligned} \omega_{1},\ k\in[0,2c)\\ \omega_{2},\ k\in\left[2c,2c+\left(\frac{G}{2}-1\right)c\right)\\ \omega_{3},\ k\in\left[2c+\left(\frac{G}{2}-1\right)c,Gc\right] \end{aligned}\right. \tag{4}\]  
where \(G\) is the number of clusters and \(c\) is the distance between them. Then the weighted Euclidean distance can be described as  
\[d_{ij}^{*}\big{(}x_{i},x_{j}\big{)}=\omega d_{ij}\big{(}x_{i},x_{j}\big{)} \tag{5}\]  
where \(x_{i}\) and \(x_{j}\) are the centers of the Gaussian distribution. Using weighted Euclidean distance to calculate the probability of similarity conditions between sample pairs in high-dimensional space can be described according to [42]  
\[p_{i/j}=\frac{\exp\left(\frac{-d_{ij}^{*}\big{(}x_{i},x_{j}\big{)}^{2}}{2d_{i }^{2}}\right)}{\sum_{k\
eq j}\exp\left(\frac{-d_{kj}^{*}\big{(}x_{i}x_{j} \big{)}^{2}}{2d_{j}^{2}}\right)} \tag{6}\]  
Figure 1: The improved clustering algorithm.  
The variance parameter of the corresponding Gaussian function is determined in relation to the final number of nearest neighbors, determined so that \(P\) is higher when \(x_{i}\) is closer to \(x_{j}\). In that case, the conditional probabilities can be calculated [43]. For the identification of electronic equipment, the categories are represented by the event of set \(Y_{i}\), and each kind of identified symptom is represented by the event of \(X\). The probability that a kind of device may be used can be calculated when a certain condition is given.  
A classic Bayesian network with two layers is shown in Figure 2. The network is built with nodes and directed arcs and is divided into two layers: the upper layer and the lower layer. Nodes in the upper layer are parent nodes, while nodes in the lower layer are child nodes, and they are connected by directed arcs.  
The network is constructed based on three independent assumptions:  
1. All parent nodes are independent of each other.
2. If child nodes have no links to one another, all the child nodes of one certain parent node are independent of each other when the state of their parent node is given.
3. Any child node, when the state of its linked parent node is given, is independent of the parent nodes that have no direct links to it.