## 3 Methodology
### Variation Expectation Maximization  
The EM method is a parameter solution method of the Gaussian mixture model, which is usually used to solve a low-dimensional model with a known number of components. However, it is impossible to determine in advance how many Gaussian models are needed to achieve proper fitting for strange shapes. In order to better fit the possible positions of nodes, this paper proposes a variable expectation-maximization method, which can adapt to the fitting situation with an uncertain number of Gaussian components. In this paper, we consider initializing the results using a Gaussian mixture model with enough components and then filter the Gaussian distribution used for fitting by component filtering, leaving the part with higher responsiveness as the selected model Algorithm 1. In the Gaussian mixture model shown as Formula (14), \(\alpha_{k}\) is the weight of the \(k\)-th Gaussian distribution, \(\alpha_{k}\in[0,1]\), and \(\sum_{k=1}^{k}\alpha_{k}=1\). We introduce the hidden variable \(\gamma_{jk}\) to indicate whether the \(j\)-th sample comes from the \(K\)-th Gaussian distribution. When the \(j\)-th sample comes from the \(k\)-th Gaussian distribution, \(\gamma_{jk}=1\); otherwise, \(\gamma_{jk}=0\). When the weight of the \(k\)-th Gaussian distribution is more significant, the more samples from the \(k\)th Gaussian distribution there will be. On the other hand, the more samples from the \(k\)-th class, the heavier the weight of the \(k\)-th class. The relationship between the hidden variable \(\gamma_{jk}\) and the weight \(\alpha_{k}\) is:  
\[p(\gamma_{jk}=1)=\alpha_{k} \tag{26}\]  
Because \(\gamma_{j\times}=[0,\ldots 0,1,0,\ldots 0]\) for every sample \(j\) is a 1-of-\(K\) hot unique code, it can be written as follows:  
\[p(\gamma_{j\times}|\alpha)=\prod_{k=1}^{K}\alpha_{k}^{\gamma_{jk}} \tag{27}\]  
After specifying the classification, there are:  
\[p(y_{j}|\gamma_{jk}=1,\mu,\Sigma)=\mathcal{N}(y_{j}|\mu_{k},\Sigma_{k}) \tag{28}\]The joint probability of all samples considering sampling:  
\[p(\gamma|\alpha)=\prod_{j=1}^{N}\prod_{k=1}^{K}\alpha_{k}^{\gamma_{jk}} \tag{29}\]  
In case of multi-sample and multi-classification:  
\[p(y|\gamma,\mu,\Sigma)=\prod_{j=1}^{N}\prod_{k=1}^{K}\mathcal{N}(y|\mu_{k}, \Sigma_{k})^{\gamma_{jk}} \tag{30}\]  
The likelihood probability under the given distribution parameters is:  
\[P(y,\gamma|\alpha,\mu,\Sigma)=\prod_{k=1}^{K}\alpha_{k}^{n}\prod_{j=1}^{N}[ \mathcal{N}(y_{j}|\mu_{k},\Sigma_{k})]^{\gamma_{jk}} \tag{31}\]  
Among them, \(n_{k}=\sum_{j=1}^{n}\gamma_{jk}\) is used to represent the number of nodes from the \(k\)-th Gaussian distribution and can represent the intensity weight of the \(k\)-th component in the calculation. \[\alpha_{k}=\frac{n_{k}}{N} \tag{32}\]  
For the convenience of calculation, log-likelihood can be taken:  
\[\log P(y,\gamma|\theta)=\sum_{k=1}^{K}\left(n_{k}\log\alpha_{k}+\sum_{j=1}^{N }\gamma_{jk}\log[\mathcal{N}(y_{j}|\theta_{k})]\right) \tag{33}\]where:  
\[\log\bigl{[}\mathcal{N}(y_{j}|\theta_{k})\bigr{]}=-\log(2\pi)-\frac{1}{2}\log(| \Sigma_{k}|)-\frac{1}{2}(y-\mu_{k})^{T}\Sigma_{k}^{-1}(y-\mu_{k}) \tag{34}\]  
The goal of the EM algorithm is to find the distribution parameters that can make the sample appear the most expected. Through two steps of expectation and maximization, it is realized iteratively. The expectation is to calculate the expectation of hidden variables under the current observation data and parameters. Maximizing is to find the parameters that can maximize the expectation of the currently hidden variable.