# Analysis of University Students' Behavior Based on a Fusion K-Means Clustering Algorithm
## 2 Materials and Methods
### Determining the K Value and Cluster Center  
In order to correct the two drawbacks in the K-Means clustering algorithm. The paper uses the way of determining the cluster centers proposed by [PERSON] and [PERSON] in the \"CFSFDP\" cluster algorithm, which is novel, simple, and fast, and it can find the right number of classifications and the global optimal clustering center according to the data. The core of the algorithm is the description of its cluster center [31]. There are two basic assumptions in the clustering algorithm:  
* Cluster centers are surrounded by neighbors with lower local density. * Cluster centers are at a relatively large distance from any points with a higher local density. This clustering algorithm can be divided into four steps, which are introduced as follows. Step 1: Calculate the local density The dataset for clustering is \(\text{S}=\{x_{i}\}\)\( \begin{array}{c}N\\ i=1\end{array} \)\(\cdot\)\(I_{S}=\{1,2,\ldots,N\}\) is the corresponding indicator set. \(d_{ij}=d\Big{(}x_{i},x_{j}\Big{)}\) represents a certain distance between points \(x_{i}\) and \(x_{j}\). According to Cut-off kernel, the local density \(\rho_{i}\) of data point \(i\) is defined as follows:  
\[\rho_{i}=\sum_{j\in I_{x}\backslash\{i\}}\chi\Big{(}d_{ij}-d_{c}\Big{)} \tag{6}\]  
where \(\chi(x)\) is defined as follows:  
\[\chi(x)=\left\{ \begin{array}{c}1,\ x<0;\\ 0\,x\geq 0.\end{array} \right. \tag{7}\]  
Additionally, \(d_{c}\) is a cutoff distance that needs to be specified in advance. Based on formula (6), \(\rho_{i}\) is the number of data points whose distance is less than \(d_{c}\), without regard to the number of \(x_{i}\) itself. To some extent, the parameter \(d_{c}\) determines the effect of this clustering algorithm. If \(d_{c}\) is too large, the local density value of each data point will be large, resulting in low discrimination. The extreme case is that the value of \(d_{c}\) is greater than the maximum distance of all points, so the end result of the algorithm is that all points belong to the same cluster center. If the value of \(d_{c}\) is too small, the same group may be split into multiples. The extreme case is that \(d_{c}\) has a smaller distance than all points, which will result in each point being a cluster center. The reference method is to select a \(d_{c}\) so that the average number of neighbors per data point is about 1-2% of the total number of data points. Step 2: Calculate the distance  
A descending sequence of subscripts \(\{q_{i}\}_{i=1}^{N}\) was generated. \[\rho_{q_{1}}\geq\rho_{q_{2}}\geq\ldots\geq\rho_{q_{N}} \tag{8}\]  
The distance formula is as follows:  
\[\delta_{i}=\left\{ \begin{array}{c}\underset{q_{j}}{min}\Big{\{}d_{q_{i}q_{j }}\Big{\}},\ i\geq 2;\\ \underset{j\geq 2}{max}\Big{\{}\delta_{q_{j}}\Big{\}},\ i=1.\end{array} \right. \tag{9}\]  
For the above formula, when \(i=1\), \(\delta_{i}\) is the distance between the data point with the largest distance from \(x_{i}\) in S. If \(i>2\), \(\delta_{i}\) represents the distance between \(x_{i}\) and the data point (or those points) with the smallest distance from \(x_{i}\) for all data points with a local density greater than \(x_{i}\). Step 3: Select the clustering center  
So far, we could get the \((\rho_{i},\delta_{i}),i\in I_{S}\) of every data point. When considering comprehension, the following formula is used to select the clustering center:  
\[\gamma_{i}=\rho_{i}\delta_{i},\ i\in I_{S}, \tag{10}\]  
For example, Figure 8 contained 20 data points, and the \(\gamma_{i}=\rho_{i}\delta_{i},i\in I_{S}\) of every data point could be obtained. Next, \(\gamma\) was calculated to select the cluster center. Figure 9 shows the \(\gamma\) curve. According to Figure 9, it can be found that for the non-cluster centers, the curve is smoother. Besides this, there is a clear jump between the cluster centers and non-cluster centers.