# Analysis of Learning Ability of Ideological and Political Course Based on BP Neural Network and Improvedk-Means Cluster Algorithm

Authors: Guidong Zeng
Journal: Journal of Sensors
 (2022)

---

## Abstract

With the rapid development of technologies such as big data analysis, machine learning, and cloud computing, artificial intelligence has made breakthrough progress in many fields. Artificial intelligence technology has also brought profound changes to higher education. Therefore, the ideological and political course in colleges and universities should integrate artificial intelligence technology into the teaching of ideological and political education and create an “intelligent ideological and political learning” to adapt to the goal of educational reform in the new era. This paper presents a research method of innovation ability of ideological and political course based on BP neural network and improvedk-means clustering algorithm. Firstly, this method obtains the objective index that can comprehensively measure the learning ability through BP neural network and acquires the evaluation score of learning ability. Then, SPSS software is utilized to test the correlation between the influencing factors and the index, harvesting the factors that significantly affect graduate students’ ideological and political learning ability. Finally, an improved k-means clustering algorithm is designed, which clusters the graduate students according to the different characteristics of the survey objects and gives targeted suggestions for each class of individuals to improve their ideological and political learning ability. The experimental results indicate that the proposed method is feasible and effective. The research method of ideological and political course ability proposed in this paper is of great significance to the promotion of ideological and political education in the era of big data.


---

## Body

## 1. Introduction

Artificial intelligence technology, as an important driving force of future educational reform, not only profoundly affects the traditional teaching mode of ideological and political education in colleges and universities but also poses a severe challenge to the orientation of the roles of teachers and students in the process of ideological and political education [1]. Based on the advantages of human-computer cooperation, cross-border integration, cocreation, and sharing brought by artificial intelligence technology, the personalized education model advocated by modern educational ideas has a practical basis.Throughout the practice of educational informatization at home and abroad, the practical conditions for applying artificial intelligence technology to the field of education have matured, and related theoretical research and practical exploration are being carried out simultaneously [2]. Du et al. [3] proposed an English network teaching method based on artificial intelligence technology and WBIETS system, improving the deep learning network and taking it as the core algorithm of WBIETS system. Sun et al. [4] put forward the decision tree algorithm and the implementation model of English teaching evaluation based on neural network, which could help teachers improve their education level and students’ English scores. The collaborative recommendation algorithm obtains a good accuracy in the course recommendation task according to the history of students’ course selection records [5, 6]. In the big data environment, machine learning is used to predict learning results in online courses [7].The ideological and political theory course in colleges is the main channel to strengthen and improve the ideological and political education of students and postgraduates. In China, the demand and trend of the integration and innovation of artificial intelligence technology and ideological and political education are becoming more and more obvious, while there are still some bottlenecks in the integration process. Therefore, educational practitioners should reflect from the perspective of the gap between traditional teaching mode and modern technology, providing a three-dimensional thinking for the practice of “intelligent thinking and politics” in colleges and universities in China.Educational data mining and learning analysis are new research fields. It is worth studying if various statistical and machine learning methods are applied to enhance ideological and political classroom education. Neural network and clustering algorithm are commonly used data mining methods. Neural network is widely used in pattern recognition, analysis, control, and prediction. Literature [8] proposes research on the optimization of scientific research performance management based on BP (back propagation) neural network. This algorithm uses neural network to construct the performance evaluation model of social science research in colleges and universities. The experimental results demonstrate that the model is an efficient evaluation method. BP neural network extracts six paper features, two journal features, nine author features, eight reference features, and five early citation features to predict the citation times of a single paper [9].In the era of big data, clustering analysis of massive data is an important research direction. Clustering algorithm has been widely used in education, e-commerce, transportation, and other fields [10]. k-means is widely used because of its high efficiency and easy understanding. However, the initial clustering center of traditional k-means algorithm is randomly selected, which easily leads to the clustering result falling into local optimum [11]. Meanwhile, the random method will also lead to the instability of the initial clustering center selection, which makes the clustering result unstable. Many scholars have done a great number of researches on the initial clustering center selection of k-means algorithm. For example, adaptive cuckoo and gravity search algorithm are used to optimize the initial cluster center by introducing swarm intelligence algorithm. However, the algorithm has not been applied because of its complexity [12]. Some scholars optimize the initial clustering center from the perspective of sample data density and distance. For example, Kalevala et al. [13] considered local distance to optimize the algorithm. Tang et al. [14] consider density and distance step by step, but calculating the data weight increases the time consumption. Yu et al. [15] proposed LOF algorithm to build a potential background dictionary from the perspective of local density and effectively excluded abnormal objects by calculating local density and abnormal values, yet there was a problem of inaccurate selection of cluster centers.Domestic colleges and universities are also paying more and more attention to the cultivation of ideological and political classroom thinking ability and innovation ability of college students. Nevertheless, the effect is not obvious. This paper studies how to improve the ideological and political learning ability of postgraduates. Firstly, the influencing factors of learning ability are preliminarily determined through data collection and screening of effective information. Then, a specific standard to measure the abstract term learning ability is formulated according to BP neural network. Thus, the correlation between learning ability and influencing factors is analyzed to screen out the influencing factors with significant correlation. Finally, these factors will be used as variables to improvek-means clustering, and specific suggestions will be put forward for each type of individuals.


## 2. Algorithm Model in This Paper

### 2.1. Collect Data to Preliminarily Determine the Influencing Factors

This paper investigates the factors that affect students’ learning ability in ideological and political class. Data were collected by literature survey, questionnaire survey, and focus interview. The interview outline is listed on the basis of literature survey. Graduate students and graduate tutors from different majors were invited in the form of interview groups to deeply explore the internal and external factors related to learning ability. The internal factors affecting learning ability include gender and interest, as shown in Figure1.Figure 1
Related factors of graduate students’ ideological and political learning ability.External factors include learning objects, external environment, teacher factors, and supervision factors. The learning object is subdivided into the difficulty, innovation, and research significance of the subject. The external learning environment is subdivided into teaching facilities, learning atmosphere, and ideological and political help to the industry. Teachers’ factors are subdivided into teachers’ level, guiding-learning relationship, and evaluation system. Based on this, a questionnaire was compiled. In this study, 1230 formal questionnaires were distributed, and 1200 were effectively recovered. The effective questionnaire recovery rate was 97.56%, which was statistically significant. Sample distribution is shown in Table1.Table 1
Statistical table of sample distribution (n=1200).
CategoryProjectQuantityPercentageCategoryProjectQuantityPercentageGenderMan56945.50%Learning atmosphereGood52742.40%Woman68154.50%Common72357.80%InterestHigh55144.10%Industry helpEnormous31024.80%Low69955.90%More32125.70%Degree of difficultyDifficult66953.50%Common35928.70%Easy58146.50%Less21016.80%Research significanceGreat43434.70%Minimum504.00%Common81665.30%Teacher levelHigher91673.30%Degree of innovationHigh68154.50%Common33426.70%Low56945.50%Learning relationshipVery harmonious23518.80%Supporting facilitiesPerfect116685.30%Fairly harmonious64451.50%Imperfect18414.70%Common29723.80%SupervisorTimely and accurate95676.50%Extremely discordant745.90%Evaluation systemPerfect119581.20%Need to be improved29423.50%Imperfect23518.80%


### 2.2. Evaluation Model of Students’ Learning Ability Based on BP Neural Network

#### 2.2.1. BP Network Design

The design of BP network includes the input layer, the output layer, the number of nodes in the hidden layer, and the transfer function between layers.(1) Enter the Number of Layer Nodes. The number of input layer nodes corresponds to the number of evaluation indexes. Based on many research findings, the evaluation indexes are test scores, creative ability, scientific research ability, paper writing ability, and competition level. According to the analysis, the evaluation indexes of graduate students’ ideological and political learning ability are as follows: 5x1−x5, so these five evaluation indexes are taken as input nodes n=5.(2) Number of Output Layer Nodes. This paper takes the final evaluation result as the output of the network. Number of output nodes m=1.(3) Number of Hidden Layer Nodes. Based on the Kolmogorov theorem proved by Hecht-Nielsen, three-layer BP neural network can approximate any continuous function under reasonable structure and proper weight conditions. Therefore, the three-layer BP network is selected in order to simplify the calculation.There is no optimal theoretical method to determine the number of hidden layer nodes, which is a more complicated problem. Too few nodes will lead to poor fault tolerance. Too much network training time will be increased and generalization ability will be reduced. Therefore, the designer’s experience and many experiments are usually used to determine the optimal number of hidden nodes. This paper chooses the number of implicit nodess=3 after empirical analysis.


#### 2.2.2. BP Network Learning Algorithm

(1)
Input: datasetD. Learning rate α: α∈0,1. Stop condition: the error rate specifies the threshold θ. The maximum number of iterations is T∗(2)
Initial link weight:T=0, gpqT, sqT, ωqkT, bkT(3)
Input samplesuh,xh in turn, and calculate the expected predicted value xk(4)
Update the link weight:(1)gpqT+1=gpqT+ΔgpqT,sqT+1=sqT+ΔsqT,ωqkT+1=ωqkT+ΔωqkT,bkT+1=bkT+ΔbkT,wheregpqT,ωqkT represents the forward propagation connection weight. sqT,bkT represents the back propagation connection weight
(5)
T=T+1, judge whether the stopping condition is met. If the model error is less than the specified threshold or the maximum iteration times are greater than the threshold, stop the iteration. Otherwise, return to Step 3(6)
Output:gpqT, sqT, ωqkT, bkT. The output value of the kth neuron in the output layer is(2)x^k=f∑q=1dωqkzq+bk,wherezq indicates hidden input


#### 2.2.3. Application of BP Network Model

Based on the above analysis, this paper uses Python to build a three-layer BP neural network with 5 input neurons, 3 hidden layer neurons, and 1 output neuron. When the five evaluation indexes: examination score, creation ability, scientific research ability, thesis writing ability, and competition level, are used as inputs, the input data (training samples) need to be normalized. The linear function is used as the transfer function because the input layer only transmits data. The neurons in the hidden layer adoptS-type function (Sigmoid function). At the same time, the learning rate is 0.6, and the convergence error threshold is 0.001. Finally, the evaluation results were reverse-normalized and the evaluation scores were obtained as shown in Table 2.Table 2
Evaluation score of graduate students’ ideological and political learning ability.
Evaluation score of ideological and political learning abilityTheoretical achievementBe poorCommonGoodParticipation in ideological and political ability competitionParticipated inWin a prize369Unawarded258Did not attend147The number of training samples selected is 200, which can satisfy the fitting. 100 people are employed to predict the test model. The prediction results are compared with the expert evaluation results, and the prediction accuracy is observed. Finally, it demonstrates that the evaluation model of graduate students’ ideological and political learning ability based on BP neural network is reasonable and effective.


### 2.3. Screening the Significant Influencing Factors of Ideological and Political Learning Ability

The influencing factors of graduate students’ ideological and political learning ability collected by qualitative investigation methods such as focus interview and expert discussion are subjective and can only be defined as a preliminary scope. This paper studies the correlation degree between these factors and ideological and political learning ability in quantitative form after determining the measurement standard according to BP neural network. In this way, the factors with significant correlation can be screened out, and the weak correlation factors can be filtered out, ensuring the accuracy of the research. Based on the evaluation score of ideological and political learning ability obtained by the BP neural network mentioned above, the correlation degree between the internal and external influencing factors such as ideological and political learning ability and interest, learning atmosphere, evaluation system, teacher’s teaching, and ideological and political learning ability is studied. In this study, SPSS 22.0 was used for Spearman correlation analysis.The Spearman correlation coefficient between two random variablesu and x is recorded as r [16], and its formula is
(3)r=1−6∑p=1nDp2nn2−1,where(4)∑i=1nDp2=∑p=1nUp−Vp2,whereu represents the evaluation score of learning ability. x represents 9 significant influencing factors. Up and Vp represent the rank after sorting variables u and x, respectively. n represents the sample size.


#### 2.3.1. Research on Internal Influencing Factors

Table3 is a statistical table of the correlation and difference between postgraduate’s learning ability and internal influencing factors. According to the correlation test, gender and interest are significantly related to learning ability (P<0.01). According to the difference test, there are significant differences between the two variables and learning ability (P<0.05).Table 3
Statistical table of correlation and difference between postgraduate’s learning ability and its internal factors.
ProjectRelevancePDifferenceSigGender0.2830.161Interest0.0070.003There is no significant correlation between gender and learning ability (P>0.01), and there is no significant difference between gender and learning ability (P>0.05).Interest and ideological and political learning ability have a very significant correlation (P<0.01), and the difference between interest and learning ability is extremely significant (P<0.05). Among them, the more interest in learning, the stronger the learning ability, indicating a positive correlation trend. This phenomenon also accords with people’s consistent thinking. The more interested you are, the more time and energy you put into it, and the stronger your ideological and political thinking ability.


#### 2.3.2. Research on External Influencing Factors

Table4 is a statistical table of the correlation and difference between graduate students’ ideological and political learning ability and external influencing factors. The correlation test indicates that the difficulty and innovation degree of the subject in the learning object, the learning atmosphere and industry help in the external environment, all variables in the teacher factors and supervision work have significant correlation with the ideological and political learning ability (P<0.01) and significant difference (P<0.05). The correlation and difference of other variables are not significant.Table 4
Statistical table of correlation and difference between postgraduates’ learning ability and external factors.
ProjectRelevancePDifferenceSigLearning objectDifficulty degree of subject0.010.015Research significance0.1310.253Degree of innovation0.0090.02External environmentLearning atmosphere0.0030.084Teaching facilities0.8780.68Industry help00.005Teacher factorTeacher level0.010.014Learning relationship0.0090.012Evaluation system0.0070.013Supervision factorSupervising work0.0050.006Learning object: the difficulty and innovation degree of the subject in the learning object have a very significant correlation with the learning ability (P<0.01), and the difference in the influence on the ideological and political learning ability is extremely significant (P<0.05). However, the relevance and difference of research significance are not notable. Among them, the higher the learning ability, the higher the difficulty and innovation degree of the subject. This just indicates that people with strong ideological and political learning ability have stronger ability to solve difficult problems, while the significance of research is the selectivity of topics, which has little to do with learning ability.The external environment: the learning atmosphere and industry help in the external environment have a very significant correlation with the ideological and political learning ability (P<0.01), and the difference in their influence is extremely significant (P<0.05). However, the relevance and difference of teaching facilities are not significant. Among them, the study of ideological and political courses has a great relationship with the learning atmosphere of the school. The stronger the learning atmosphere, the higher the enthusiasm for learning ideological and political affairs. If the future industry needs more ideological and political education, the demanders will study more enthusiastically.All the variables in teachers’ factors have a very significant correlation with the ability of ideological and political learning (P<0.01), and they have a significant influence on the ability of ideological and political learning.The difference of influence is extremely enormous (P<0.05). Among them, the higher the level of teachers and the more concerned about students, the higher the students’ learning enthusiasm. The stricter the evaluation system is, the harder students will study in order to pass the exam, which is positively related to their learning ability.Factors of supervision: there is a very significant correlation between supervision and ideological and political learning ability (P<0.01), and the difference of influence on ideological and political learning ability is extremely remarkable (P<0.05). Among them, the timelier the teacher’s supervision is done, the students will naturally keep up with the learning progress in time.In this study, questionnaire survey and group discussion were used to explore the ideological and political learning ability and influencing factors of postgraduates, and the following conclusions were drawn. (1) Both internal and external factors of ideological and political learning ability had significant influence on it. Among them, the internal factors include interest, and the external factors include the difficulty and innovation of the subject in the learning object, the learning atmosphere, and industry help in the external environment, all variables in the teacher factors and supervision. (2) Interest and industry help have the greatest correlation with ideological and political study.


### 2.4. Improve the Clustering of Significant Influencing Factors ofk-Means Algorithm

In order to improve the clustering accuracy of significant influencing factors of ideological and political ability, this paper proposes an improvedk-means algorithm DC k-means (density parameter and center replacement k-means) based on density parameters and center replacement. The algorithm uses the density parameters of data objects to gradually determine the initial cluster center and uses the center replacement method to update the initial center that deviates from the actual position. Therefore, DC k-means is more accurate than the traditional clustering algorithm.The DCk-means proposed in this paper firstly determines the initial cluster center by calculating the density parameters of each data object in the dataset, avoiding the unstable clustering result caused by randomly selecting the initial cluster center. Secondly, the biased cluster centers generated by the traditional k-means algorithm are replaced to avoid the influence of outliers on the clustering results.


#### 2.4.1. Selection of Initial Cluster Centers Based on Density Parameters

DCk-means adopts the strategy of selecting cluster center based on density parameter increment. This section and subsequent discussions assume that in Euclidean space Rm, dataset D=y1,y2,⋯,yn contains n data objects. Every object yi=yp1,yp2,⋯,ypm has m attributes. Dataset D is divided into k clusters by a clustering algorithm C=C1,C2,⋯,CK, where CK is the number of data objects contained in the class cluster CK. The corresponding center point of each cluster in cluster set C is V=V1,V2,⋯,VK. Euclidean distance dyp,yq between any two data objects yp and yq in dataset D is defined as
(5)dyp,yq=yp1−yq12+yp2−yq22+⋯+ypm−yqm2.Based on Euclidean distance, the maximum distance (LaDist) and minimum distance (SmDist) between all data objects are defined as follows:(6)Laipst=∑p=1n−1max1≤p<q≤ndyp,yq2,Smipst=∑p=1n−1min1≤p<q≤ndyp,yq2.Although it is assumed above that the datasetD is divided into k clusters, the number of data objects in each cluster generated by different clustering algorithms may be different. As the number of data objects changes, the distance between each data object pair will also alter. Define the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects:
(7)Divests=LaDist+SmDist2∗K,wherek is the number of clusters into which dataset D is divided. According to the dynamic average distance, the density parameter can be defined as follows.In datasetD, the number of data objects in the circular area with yp as the center and Divests as the radius is called the density parameter of data object yp, that is,
(8)ρyp,DyAveDpst=∑p=1,q≠pnjDyAveDpst−dyp,yq,wherej is a jump function. jy=1 when y≥=0; otherwise, jy=0.In the process of finding the center of initial cluster, most density-based clustering algorithms are more dependent on external parameters in the choice of neighborhood radius. Improper parameter selection will greatly affect the performance of the algorithm. To solve this problem, this paper first defines the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects. The distance dynamically changes with each iteration, which can obtain the neighborhood radius of different division stages in time, to determine the density parameters more efficiently and stably and reduce the influence of external parameters on clustering results.


#### 2.4.2. Replacement of Cluster Center

Another defect of traditionalk-means algorithm is that it is very sensitive to outliers of dataset. In fact, some initial cluster centers generated by traditional k-means algorithm are not real cluster centers in the target dataset (this paper calls these points “pseudocenters”). In addition, the position of the generated cluster center will deviate from that of the actual cluster center due to the influence of outliers. This problem will seriously reduce the accuracy of traditional k-means algorithm.The center generated byk-medoids clustering algorithm is always the real data point of the target dataset. Inspired by k-medoids algorithm, this paper proposes to update the pseudocenters generated by traditional k-means algorithm by using center replacement method. Once the k-means algorithm creates a pseudocenter for a class cluster, it will be replaced by the nearest point in the class cluster. At the same time, the neighboring point should be as far away from the outliers of this cluster as possible. In the process of clustering, the pseudocluster centers are updated in turn until all the real cluster centers are specified.Figure2 shows the replacement process of clusters containing outliers and their corresponding pseudocenters. In Figure 2, the blue dots represent normal data objects and the red dots represent outliers. Figure 2(a) shows a dataset composed of three clusters randomly generated by Python software. The cluster at the bottom left of Figure 2(a) contains an outlier represented by a red dot. Figure 2(b) shows the replacement process of the center point of this kind of cluster. Without outlier interference, the traditional k-means algorithm takes the object represented by the black rectangle as the cluster center. However, if the outliers in the cluster are considered, the obtained cluster center will deviate from the “actual” cluster center. As shown in Figure 2(b), along the arrow direction, the center of the cluster moves from the position of the black rectangle to the position of the green rectangle. This deviation will lead to the performance degradation of clustering algorithm. In fact, with the deviation of cluster center, many data objects that do not belong to this cluster will be included in the next iteration of clustering algorithm. In Figure 2(b), this paper uses an improved method to take the blue dot in the red rectangular box as the final cluster center. The center is the actual data object, which is closest to the black rectangle and as far away from the red outlier as possible.Figure 2
Replacement of outliers and pseudocenters.
(a)(b)


#### 2.4.3. DCk-Means Process and Time Analysis

The flow of DCk-means algorithm is shown in Algorithm 1. DC k-means algorithm can not only find the center of initial cluster stably but also can deal with outliers. In Algorithm 1: (1) calculate the dynamic average distance between all data objects in dataset D. (2) Calculate the density parameters of all data objects. (3) Find k initial cluster centers of dataset D and put them into set V according to the density parameter. Steps (4)–(8) realize the final division of dataset D. Specifically, step (5) initializes each cluster. (6) Put the data object into the corresponding class cluster. (7) Update the cluster center by using the center replacement method.Input: datasetD=y1,y2,⋯,yn, number of clusters K.Output:C=C1,C2,⋯,CK of dataset D.Algorithm:(1)
Calculate the dynamic average distance (Divests) between any pair of data objects yp,yq in dataset D(2)
Forp=1,2,⋯,n, do calculate the density parameter ρyp,DyAveDpst of the data object yp(3)
Fork=1,2,⋯,K, do//find k initial cluster centers and put them into the initial cluster center set V. Select the data object y with the highest density parameter from dataset D, and delete all data objects about y from dataset D. Set y as the center of the kth initial cluster and vk. V⟵vk;//put vk into set V in the center of the initial cluster(4)
Repeat(5)
LetCk=∅1≤k≤K//initialize each cluster Ck(6)
Forp=1,2⋯,n do//put each data object in D into the corresponding cluster. Calculate the distance between the centers of each cluster in data objects yp and V. Put yp into the corresponding class cluster according to the nearest principle(7)
Fork=1,2,⋯,K, do//update the center of each cluster. Calculate the distance between the center vk of the cluster Ck and other data objects in the cluster; find the nearest data object (vk′) to vk. At the same time, vk′ should be as far away from the outliers in Ck as possible. If vk≠vk′vk⟵vk′//vk′ is updated as the new center of class Ck(8)
Until∑i=1K∑X∈Cidvi,x2 converted//until the standard function ∑i=1K∑X∈Cidvi,x2 converges to a constant, at which point vk is the new center of class CkAssume that there aren data objects in dataset D=y1,y2,⋯,yn. Every data object yi=yi1,yi2,⋯,yim is a dimension vector of m. The DC k-means algorithm will divide dataset D into k clusters C=C1,C2,⋯,CK through h iterations.According to the individual’s theoretical and practical ability, BP neural network divides the learning ability of ideological and political education into nine levels. Subjective and abstract indicators are standardized, making individuals more different. It is found that the factors significantly related to the evaluation scores of ideological and political learning abilities are interest, guidance and learning relationship, industry help, project difficulty, innovation degree, teachers’ level, supervision factors, evaluation system, and learning atmosphere. Those factors that have significant correlation and difference with the ideological and political learning ability and the evaluation score of the ideological and political learning ability are selected as cluster variables so that there are significant differences among all kinds, and the significance of cluster analysis is clarified. In the experimental part, DCk-means cluster analysis will be used to classify different research individuals, and according to the characteristics of each category, targeted suggestions will be put forward for their graduate students to improve their ideological and political learning ability.


## 2.1. Collect Data to Preliminarily Determine the Influencing Factors

This paper investigates the factors that affect students’ learning ability in ideological and political class. Data were collected by literature survey, questionnaire survey, and focus interview. The interview outline is listed on the basis of literature survey. Graduate students and graduate tutors from different majors were invited in the form of interview groups to deeply explore the internal and external factors related to learning ability. The internal factors affecting learning ability include gender and interest, as shown in Figure1.Figure 1
Related factors of graduate students’ ideological and political learning ability.External factors include learning objects, external environment, teacher factors, and supervision factors. The learning object is subdivided into the difficulty, innovation, and research significance of the subject. The external learning environment is subdivided into teaching facilities, learning atmosphere, and ideological and political help to the industry. Teachers’ factors are subdivided into teachers’ level, guiding-learning relationship, and evaluation system. Based on this, a questionnaire was compiled. In this study, 1230 formal questionnaires were distributed, and 1200 were effectively recovered. The effective questionnaire recovery rate was 97.56%, which was statistically significant. Sample distribution is shown in Table1.Table 1
Statistical table of sample distribution (n=1200).
CategoryProjectQuantityPercentageCategoryProjectQuantityPercentageGenderMan56945.50%Learning atmosphereGood52742.40%Woman68154.50%Common72357.80%InterestHigh55144.10%Industry helpEnormous31024.80%Low69955.90%More32125.70%Degree of difficultyDifficult66953.50%Common35928.70%Easy58146.50%Less21016.80%Research significanceGreat43434.70%Minimum504.00%Common81665.30%Teacher levelHigher91673.30%Degree of innovationHigh68154.50%Common33426.70%Low56945.50%Learning relationshipVery harmonious23518.80%Supporting facilitiesPerfect116685.30%Fairly harmonious64451.50%Imperfect18414.70%Common29723.80%SupervisorTimely and accurate95676.50%Extremely discordant745.90%Evaluation systemPerfect119581.20%Need to be improved29423.50%Imperfect23518.80%


## 2.2. Evaluation Model of Students’ Learning Ability Based on BP Neural Network

### 2.2.1. BP Network Design

The design of BP network includes the input layer, the output layer, the number of nodes in the hidden layer, and the transfer function between layers.(1) Enter the Number of Layer Nodes. The number of input layer nodes corresponds to the number of evaluation indexes. Based on many research findings, the evaluation indexes are test scores, creative ability, scientific research ability, paper writing ability, and competition level. According to the analysis, the evaluation indexes of graduate students’ ideological and political learning ability are as follows: 5x1−x5, so these five evaluation indexes are taken as input nodes n=5.(2) Number of Output Layer Nodes. This paper takes the final evaluation result as the output of the network. Number of output nodes m=1.(3) Number of Hidden Layer Nodes. Based on the Kolmogorov theorem proved by Hecht-Nielsen, three-layer BP neural network can approximate any continuous function under reasonable structure and proper weight conditions. Therefore, the three-layer BP network is selected in order to simplify the calculation.There is no optimal theoretical method to determine the number of hidden layer nodes, which is a more complicated problem. Too few nodes will lead to poor fault tolerance. Too much network training time will be increased and generalization ability will be reduced. Therefore, the designer’s experience and many experiments are usually used to determine the optimal number of hidden nodes. This paper chooses the number of implicit nodess=3 after empirical analysis.


### 2.2.2. BP Network Learning Algorithm

(1)
Input: datasetD. Learning rate α: α∈0,1. Stop condition: the error rate specifies the threshold θ. The maximum number of iterations is T∗(2)
Initial link weight:T=0, gpqT, sqT, ωqkT, bkT(3)
Input samplesuh,xh in turn, and calculate the expected predicted value xk(4)
Update the link weight:(1)gpqT+1=gpqT+ΔgpqT,sqT+1=sqT+ΔsqT,ωqkT+1=ωqkT+ΔωqkT,bkT+1=bkT+ΔbkT,wheregpqT,ωqkT represents the forward propagation connection weight. sqT,bkT represents the back propagation connection weight
(5)
T=T+1, judge whether the stopping condition is met. If the model error is less than the specified threshold or the maximum iteration times are greater than the threshold, stop the iteration. Otherwise, return to Step 3(6)
Output:gpqT, sqT, ωqkT, bkT. The output value of the kth neuron in the output layer is(2)x^k=f∑q=1dωqkzq+bk,wherezq indicates hidden input


### 2.2.3. Application of BP Network Model

Based on the above analysis, this paper uses Python to build a three-layer BP neural network with 5 input neurons, 3 hidden layer neurons, and 1 output neuron. When the five evaluation indexes: examination score, creation ability, scientific research ability, thesis writing ability, and competition level, are used as inputs, the input data (training samples) need to be normalized. The linear function is used as the transfer function because the input layer only transmits data. The neurons in the hidden layer adoptS-type function (Sigmoid function). At the same time, the learning rate is 0.6, and the convergence error threshold is 0.001. Finally, the evaluation results were reverse-normalized and the evaluation scores were obtained as shown in Table 2.Table 2
Evaluation score of graduate students’ ideological and political learning ability.
Evaluation score of ideological and political learning abilityTheoretical achievementBe poorCommonGoodParticipation in ideological and political ability competitionParticipated inWin a prize369Unawarded258Did not attend147The number of training samples selected is 200, which can satisfy the fitting. 100 people are employed to predict the test model. The prediction results are compared with the expert evaluation results, and the prediction accuracy is observed. Finally, it demonstrates that the evaluation model of graduate students’ ideological and political learning ability based on BP neural network is reasonable and effective.


## 2.2.1. BP Network Design

The design of BP network includes the input layer, the output layer, the number of nodes in the hidden layer, and the transfer function between layers.(1) Enter the Number of Layer Nodes. The number of input layer nodes corresponds to the number of evaluation indexes. Based on many research findings, the evaluation indexes are test scores, creative ability, scientific research ability, paper writing ability, and competition level. According to the analysis, the evaluation indexes of graduate students’ ideological and political learning ability are as follows: 5x1−x5, so these five evaluation indexes are taken as input nodes n=5.(2) Number of Output Layer Nodes. This paper takes the final evaluation result as the output of the network. Number of output nodes m=1.(3) Number of Hidden Layer Nodes. Based on the Kolmogorov theorem proved by Hecht-Nielsen, three-layer BP neural network can approximate any continuous function under reasonable structure and proper weight conditions. Therefore, the three-layer BP network is selected in order to simplify the calculation.There is no optimal theoretical method to determine the number of hidden layer nodes, which is a more complicated problem. Too few nodes will lead to poor fault tolerance. Too much network training time will be increased and generalization ability will be reduced. Therefore, the designer’s experience and many experiments are usually used to determine the optimal number of hidden nodes. This paper chooses the number of implicit nodess=3 after empirical analysis.


## 2.2.2. BP Network Learning Algorithm

(1)
Input: datasetD. Learning rate α: α∈0,1. Stop condition: the error rate specifies the threshold θ. The maximum number of iterations is T∗(2)
Initial link weight:T=0, gpqT, sqT, ωqkT, bkT(3)
Input samplesuh,xh in turn, and calculate the expected predicted value xk(4)
Update the link weight:(1)gpqT+1=gpqT+ΔgpqT,sqT+1=sqT+ΔsqT,ωqkT+1=ωqkT+ΔωqkT,bkT+1=bkT+ΔbkT,wheregpqT,ωqkT represents the forward propagation connection weight. sqT,bkT represents the back propagation connection weight
(5)
T=T+1, judge whether the stopping condition is met. If the model error is less than the specified threshold or the maximum iteration times are greater than the threshold, stop the iteration. Otherwise, return to Step 3(6)
Output:gpqT, sqT, ωqkT, bkT. The output value of the kth neuron in the output layer is(2)x^k=f∑q=1dωqkzq+bk,wherezq indicates hidden input


## 2.2.3. Application of BP Network Model

Based on the above analysis, this paper uses Python to build a three-layer BP neural network with 5 input neurons, 3 hidden layer neurons, and 1 output neuron. When the five evaluation indexes: examination score, creation ability, scientific research ability, thesis writing ability, and competition level, are used as inputs, the input data (training samples) need to be normalized. The linear function is used as the transfer function because the input layer only transmits data. The neurons in the hidden layer adoptS-type function (Sigmoid function). At the same time, the learning rate is 0.6, and the convergence error threshold is 0.001. Finally, the evaluation results were reverse-normalized and the evaluation scores were obtained as shown in Table 2.Table 2
Evaluation score of graduate students’ ideological and political learning ability.
Evaluation score of ideological and political learning abilityTheoretical achievementBe poorCommonGoodParticipation in ideological and political ability competitionParticipated inWin a prize369Unawarded258Did not attend147The number of training samples selected is 200, which can satisfy the fitting. 100 people are employed to predict the test model. The prediction results are compared with the expert evaluation results, and the prediction accuracy is observed. Finally, it demonstrates that the evaluation model of graduate students’ ideological and political learning ability based on BP neural network is reasonable and effective.


## 2.3. Screening the Significant Influencing Factors of Ideological and Political Learning Ability

The influencing factors of graduate students’ ideological and political learning ability collected by qualitative investigation methods such as focus interview and expert discussion are subjective and can only be defined as a preliminary scope. This paper studies the correlation degree between these factors and ideological and political learning ability in quantitative form after determining the measurement standard according to BP neural network. In this way, the factors with significant correlation can be screened out, and the weak correlation factors can be filtered out, ensuring the accuracy of the research. Based on the evaluation score of ideological and political learning ability obtained by the BP neural network mentioned above, the correlation degree between the internal and external influencing factors such as ideological and political learning ability and interest, learning atmosphere, evaluation system, teacher’s teaching, and ideological and political learning ability is studied. In this study, SPSS 22.0 was used for Spearman correlation analysis.The Spearman correlation coefficient between two random variablesu and x is recorded as r [16], and its formula is
(3)r=1−6∑p=1nDp2nn2−1,where(4)∑i=1nDp2=∑p=1nUp−Vp2,whereu represents the evaluation score of learning ability. x represents 9 significant influencing factors. Up and Vp represent the rank after sorting variables u and x, respectively. n represents the sample size.


### 2.3.1. Research on Internal Influencing Factors

Table3 is a statistical table of the correlation and difference between postgraduate’s learning ability and internal influencing factors. According to the correlation test, gender and interest are significantly related to learning ability (P<0.01). According to the difference test, there are significant differences between the two variables and learning ability (P<0.05).Table 3
Statistical table of correlation and difference between postgraduate’s learning ability and its internal factors.
ProjectRelevancePDifferenceSigGender0.2830.161Interest0.0070.003There is no significant correlation between gender and learning ability (P>0.01), and there is no significant difference between gender and learning ability (P>0.05).Interest and ideological and political learning ability have a very significant correlation (P<0.01), and the difference between interest and learning ability is extremely significant (P<0.05). Among them, the more interest in learning, the stronger the learning ability, indicating a positive correlation trend. This phenomenon also accords with people’s consistent thinking. The more interested you are, the more time and energy you put into it, and the stronger your ideological and political thinking ability.


### 2.3.2. Research on External Influencing Factors

Table4 is a statistical table of the correlation and difference between graduate students’ ideological and political learning ability and external influencing factors. The correlation test indicates that the difficulty and innovation degree of the subject in the learning object, the learning atmosphere and industry help in the external environment, all variables in the teacher factors and supervision work have significant correlation with the ideological and political learning ability (P<0.01) and significant difference (P<0.05). The correlation and difference of other variables are not significant.Table 4
Statistical table of correlation and difference between postgraduates’ learning ability and external factors.
ProjectRelevancePDifferenceSigLearning objectDifficulty degree of subject0.010.015Research significance0.1310.253Degree of innovation0.0090.02External environmentLearning atmosphere0.0030.084Teaching facilities0.8780.68Industry help00.005Teacher factorTeacher level0.010.014Learning relationship0.0090.012Evaluation system0.0070.013Supervision factorSupervising work0.0050.006Learning object: the difficulty and innovation degree of the subject in the learning object have a very significant correlation with the learning ability (P<0.01), and the difference in the influence on the ideological and political learning ability is extremely significant (P<0.05). However, the relevance and difference of research significance are not notable. Among them, the higher the learning ability, the higher the difficulty and innovation degree of the subject. This just indicates that people with strong ideological and political learning ability have stronger ability to solve difficult problems, while the significance of research is the selectivity of topics, which has little to do with learning ability.The external environment: the learning atmosphere and industry help in the external environment have a very significant correlation with the ideological and political learning ability (P<0.01), and the difference in their influence is extremely significant (P<0.05). However, the relevance and difference of teaching facilities are not significant. Among them, the study of ideological and political courses has a great relationship with the learning atmosphere of the school. The stronger the learning atmosphere, the higher the enthusiasm for learning ideological and political affairs. If the future industry needs more ideological and political education, the demanders will study more enthusiastically.All the variables in teachers’ factors have a very significant correlation with the ability of ideological and political learning (P<0.01), and they have a significant influence on the ability of ideological and political learning.The difference of influence is extremely enormous (P<0.05). Among them, the higher the level of teachers and the more concerned about students, the higher the students’ learning enthusiasm. The stricter the evaluation system is, the harder students will study in order to pass the exam, which is positively related to their learning ability.Factors of supervision: there is a very significant correlation between supervision and ideological and political learning ability (P<0.01), and the difference of influence on ideological and political learning ability is extremely remarkable (P<0.05). Among them, the timelier the teacher’s supervision is done, the students will naturally keep up with the learning progress in time.In this study, questionnaire survey and group discussion were used to explore the ideological and political learning ability and influencing factors of postgraduates, and the following conclusions were drawn. (1) Both internal and external factors of ideological and political learning ability had significant influence on it. Among them, the internal factors include interest, and the external factors include the difficulty and innovation of the subject in the learning object, the learning atmosphere, and industry help in the external environment, all variables in the teacher factors and supervision. (2) Interest and industry help have the greatest correlation with ideological and political study.


## 2.3.1. Research on Internal Influencing Factors

Table3 is a statistical table of the correlation and difference between postgraduate’s learning ability and internal influencing factors. According to the correlation test, gender and interest are significantly related to learning ability (P<0.01). According to the difference test, there are significant differences between the two variables and learning ability (P<0.05).Table 3
Statistical table of correlation and difference between postgraduate’s learning ability and its internal factors.
ProjectRelevancePDifferenceSigGender0.2830.161Interest0.0070.003There is no significant correlation between gender and learning ability (P>0.01), and there is no significant difference between gender and learning ability (P>0.05).Interest and ideological and political learning ability have a very significant correlation (P<0.01), and the difference between interest and learning ability is extremely significant (P<0.05). Among them, the more interest in learning, the stronger the learning ability, indicating a positive correlation trend. This phenomenon also accords with people’s consistent thinking. The more interested you are, the more time and energy you put into it, and the stronger your ideological and political thinking ability.


## 2.3.2. Research on External Influencing Factors

Table4 is a statistical table of the correlation and difference between graduate students’ ideological and political learning ability and external influencing factors. The correlation test indicates that the difficulty and innovation degree of the subject in the learning object, the learning atmosphere and industry help in the external environment, all variables in the teacher factors and supervision work have significant correlation with the ideological and political learning ability (P<0.01) and significant difference (P<0.05). The correlation and difference of other variables are not significant.Table 4
Statistical table of correlation and difference between postgraduates’ learning ability and external factors.
ProjectRelevancePDifferenceSigLearning objectDifficulty degree of subject0.010.015Research significance0.1310.253Degree of innovation0.0090.02External environmentLearning atmosphere0.0030.084Teaching facilities0.8780.68Industry help00.005Teacher factorTeacher level0.010.014Learning relationship0.0090.012Evaluation system0.0070.013Supervision factorSupervising work0.0050.006Learning object: the difficulty and innovation degree of the subject in the learning object have a very significant correlation with the learning ability (P<0.01), and the difference in the influence on the ideological and political learning ability is extremely significant (P<0.05). However, the relevance and difference of research significance are not notable. Among them, the higher the learning ability, the higher the difficulty and innovation degree of the subject. This just indicates that people with strong ideological and political learning ability have stronger ability to solve difficult problems, while the significance of research is the selectivity of topics, which has little to do with learning ability.The external environment: the learning atmosphere and industry help in the external environment have a very significant correlation with the ideological and political learning ability (P<0.01), and the difference in their influence is extremely significant (P<0.05). However, the relevance and difference of teaching facilities are not significant. Among them, the study of ideological and political courses has a great relationship with the learning atmosphere of the school. The stronger the learning atmosphere, the higher the enthusiasm for learning ideological and political affairs. If the future industry needs more ideological and political education, the demanders will study more enthusiastically.All the variables in teachers’ factors have a very significant correlation with the ability of ideological and political learning (P<0.01), and they have a significant influence on the ability of ideological and political learning.The difference of influence is extremely enormous (P<0.05). Among them, the higher the level of teachers and the more concerned about students, the higher the students’ learning enthusiasm. The stricter the evaluation system is, the harder students will study in order to pass the exam, which is positively related to their learning ability.Factors of supervision: there is a very significant correlation between supervision and ideological and political learning ability (P<0.01), and the difference of influence on ideological and political learning ability is extremely remarkable (P<0.05). Among them, the timelier the teacher’s supervision is done, the students will naturally keep up with the learning progress in time.In this study, questionnaire survey and group discussion were used to explore the ideological and political learning ability and influencing factors of postgraduates, and the following conclusions were drawn. (1) Both internal and external factors of ideological and political learning ability had significant influence on it. Among them, the internal factors include interest, and the external factors include the difficulty and innovation of the subject in the learning object, the learning atmosphere, and industry help in the external environment, all variables in the teacher factors and supervision. (2) Interest and industry help have the greatest correlation with ideological and political study.


## 2.4. Improve the Clustering of Significant Influencing Factors ofk-Means Algorithm

In order to improve the clustering accuracy of significant influencing factors of ideological and political ability, this paper proposes an improvedk-means algorithm DC k-means (density parameter and center replacement k-means) based on density parameters and center replacement. The algorithm uses the density parameters of data objects to gradually determine the initial cluster center and uses the center replacement method to update the initial center that deviates from the actual position. Therefore, DC k-means is more accurate than the traditional clustering algorithm.The DCk-means proposed in this paper firstly determines the initial cluster center by calculating the density parameters of each data object in the dataset, avoiding the unstable clustering result caused by randomly selecting the initial cluster center. Secondly, the biased cluster centers generated by the traditional k-means algorithm are replaced to avoid the influence of outliers on the clustering results.


### 2.4.1. Selection of Initial Cluster Centers Based on Density Parameters

DCk-means adopts the strategy of selecting cluster center based on density parameter increment. This section and subsequent discussions assume that in Euclidean space Rm, dataset D=y1,y2,⋯,yn contains n data objects. Every object yi=yp1,yp2,⋯,ypm has m attributes. Dataset D is divided into k clusters by a clustering algorithm C=C1,C2,⋯,CK, where CK is the number of data objects contained in the class cluster CK. The corresponding center point of each cluster in cluster set C is V=V1,V2,⋯,VK. Euclidean distance dyp,yq between any two data objects yp and yq in dataset D is defined as
(5)dyp,yq=yp1−yq12+yp2−yq22+⋯+ypm−yqm2.Based on Euclidean distance, the maximum distance (LaDist) and minimum distance (SmDist) between all data objects are defined as follows:(6)Laipst=∑p=1n−1max1≤p<q≤ndyp,yq2,Smipst=∑p=1n−1min1≤p<q≤ndyp,yq2.Although it is assumed above that the datasetD is divided into k clusters, the number of data objects in each cluster generated by different clustering algorithms may be different. As the number of data objects changes, the distance between each data object pair will also alter. Define the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects:
(7)Divests=LaDist+SmDist2∗K,wherek is the number of clusters into which dataset D is divided. According to the dynamic average distance, the density parameter can be defined as follows.In datasetD, the number of data objects in the circular area with yp as the center and Divests as the radius is called the density parameter of data object yp, that is,
(8)ρyp,DyAveDpst=∑p=1,q≠pnjDyAveDpst−dyp,yq,wherej is a jump function. jy=1 when y≥=0; otherwise, jy=0.In the process of finding the center of initial cluster, most density-based clustering algorithms are more dependent on external parameters in the choice of neighborhood radius. Improper parameter selection will greatly affect the performance of the algorithm. To solve this problem, this paper first defines the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects. The distance dynamically changes with each iteration, which can obtain the neighborhood radius of different division stages in time, to determine the density parameters more efficiently and stably and reduce the influence of external parameters on clustering results.


### 2.4.2. Replacement of Cluster Center

Another defect of traditionalk-means algorithm is that it is very sensitive to outliers of dataset. In fact, some initial cluster centers generated by traditional k-means algorithm are not real cluster centers in the target dataset (this paper calls these points “pseudocenters”). In addition, the position of the generated cluster center will deviate from that of the actual cluster center due to the influence of outliers. This problem will seriously reduce the accuracy of traditional k-means algorithm.The center generated byk-medoids clustering algorithm is always the real data point of the target dataset. Inspired by k-medoids algorithm, this paper proposes to update the pseudocenters generated by traditional k-means algorithm by using center replacement method. Once the k-means algorithm creates a pseudocenter for a class cluster, it will be replaced by the nearest point in the class cluster. At the same time, the neighboring point should be as far away from the outliers of this cluster as possible. In the process of clustering, the pseudocluster centers are updated in turn until all the real cluster centers are specified.Figure2 shows the replacement process of clusters containing outliers and their corresponding pseudocenters. In Figure 2, the blue dots represent normal data objects and the red dots represent outliers. Figure 2(a) shows a dataset composed of three clusters randomly generated by Python software. The cluster at the bottom left of Figure 2(a) contains an outlier represented by a red dot. Figure 2(b) shows the replacement process of the center point of this kind of cluster. Without outlier interference, the traditional k-means algorithm takes the object represented by the black rectangle as the cluster center. However, if the outliers in the cluster are considered, the obtained cluster center will deviate from the “actual” cluster center. As shown in Figure 2(b), along the arrow direction, the center of the cluster moves from the position of the black rectangle to the position of the green rectangle. This deviation will lead to the performance degradation of clustering algorithm. In fact, with the deviation of cluster center, many data objects that do not belong to this cluster will be included in the next iteration of clustering algorithm. In Figure 2(b), this paper uses an improved method to take the blue dot in the red rectangular box as the final cluster center. The center is the actual data object, which is closest to the black rectangle and as far away from the red outlier as possible.Figure 2
Replacement of outliers and pseudocenters.
(a)(b)


### 2.4.3. DCk-Means Process and Time Analysis

The flow of DCk-means algorithm is shown in Algorithm 1. DC k-means algorithm can not only find the center of initial cluster stably but also can deal with outliers. In Algorithm 1: (1) calculate the dynamic average distance between all data objects in dataset D. (2) Calculate the density parameters of all data objects. (3) Find k initial cluster centers of dataset D and put them into set V according to the density parameter. Steps (4)–(8) realize the final division of dataset D. Specifically, step (5) initializes each cluster. (6) Put the data object into the corresponding class cluster. (7) Update the cluster center by using the center replacement method.Input: datasetD=y1,y2,⋯,yn, number of clusters K.Output:C=C1,C2,⋯,CK of dataset D.Algorithm:(1)
Calculate the dynamic average distance (Divests) between any pair of data objects yp,yq in dataset D(2)
Forp=1,2,⋯,n, do calculate the density parameter ρyp,DyAveDpst of the data object yp(3)
Fork=1,2,⋯,K, do//find k initial cluster centers and put them into the initial cluster center set V. Select the data object y with the highest density parameter from dataset D, and delete all data objects about y from dataset D. Set y as the center of the kth initial cluster and vk. V⟵vk;//put vk into set V in the center of the initial cluster(4)
Repeat(5)
LetCk=∅1≤k≤K//initialize each cluster Ck(6)
Forp=1,2⋯,n do//put each data object in D into the corresponding cluster. Calculate the distance between the centers of each cluster in data objects yp and V. Put yp into the corresponding class cluster according to the nearest principle(7)
Fork=1,2,⋯,K, do//update the center of each cluster. Calculate the distance between the center vk of the cluster Ck and other data objects in the cluster; find the nearest data object (vk′) to vk. At the same time, vk′ should be as far away from the outliers in Ck as possible. If vk≠vk′vk⟵vk′//vk′ is updated as the new center of class Ck(8)
Until∑i=1K∑X∈Cidvi,x2 converted//until the standard function ∑i=1K∑X∈Cidvi,x2 converges to a constant, at which point vk is the new center of class CkAssume that there aren data objects in dataset D=y1,y2,⋯,yn. Every data object yi=yi1,yi2,⋯,yim is a dimension vector of m. The DC k-means algorithm will divide dataset D into k clusters C=C1,C2,⋯,CK through h iterations.According to the individual’s theoretical and practical ability, BP neural network divides the learning ability of ideological and political education into nine levels. Subjective and abstract indicators are standardized, making individuals more different. It is found that the factors significantly related to the evaluation scores of ideological and political learning abilities are interest, guidance and learning relationship, industry help, project difficulty, innovation degree, teachers’ level, supervision factors, evaluation system, and learning atmosphere. Those factors that have significant correlation and difference with the ideological and political learning ability and the evaluation score of the ideological and political learning ability are selected as cluster variables so that there are significant differences among all kinds, and the significance of cluster analysis is clarified. In the experimental part, DCk-means cluster analysis will be used to classify different research individuals, and according to the characteristics of each category, targeted suggestions will be put forward for their graduate students to improve their ideological and political learning ability.


## 2.4.1. Selection of Initial Cluster Centers Based on Density Parameters

DCk-means adopts the strategy of selecting cluster center based on density parameter increment. This section and subsequent discussions assume that in Euclidean space Rm, dataset D=y1,y2,⋯,yn contains n data objects. Every object yi=yp1,yp2,⋯,ypm has m attributes. Dataset D is divided into k clusters by a clustering algorithm C=C1,C2,⋯,CK, where CK is the number of data objects contained in the class cluster CK. The corresponding center point of each cluster in cluster set C is V=V1,V2,⋯,VK. Euclidean distance dyp,yq between any two data objects yp and yq in dataset D is defined as
(5)dyp,yq=yp1−yq12+yp2−yq22+⋯+ypm−yqm2.Based on Euclidean distance, the maximum distance (LaDist) and minimum distance (SmDist) between all data objects are defined as follows:(6)Laipst=∑p=1n−1max1≤p<q≤ndyp,yq2,Smipst=∑p=1n−1min1≤p<q≤ndyp,yq2.Although it is assumed above that the datasetD is divided into k clusters, the number of data objects in each cluster generated by different clustering algorithms may be different. As the number of data objects changes, the distance between each data object pair will also alter. Define the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects:
(7)Divests=LaDist+SmDist2∗K,wherek is the number of clusters into which dataset D is divided. According to the dynamic average distance, the density parameter can be defined as follows.In datasetD, the number of data objects in the circular area with yp as the center and Divests as the radius is called the density parameter of data object yp, that is,
(8)ρyp,DyAveDpst=∑p=1,q≠pnjDyAveDpst−dyp,yq,wherej is a jump function. jy=1 when y≥=0; otherwise, jy=0.In the process of finding the center of initial cluster, most density-based clustering algorithms are more dependent on external parameters in the choice of neighborhood radius. Improper parameter selection will greatly affect the performance of the algorithm. To solve this problem, this paper first defines the dynamic average distance (Divests) based on the maximum distance and minimum distance between all data objects. The distance dynamically changes with each iteration, which can obtain the neighborhood radius of different division stages in time, to determine the density parameters more efficiently and stably and reduce the influence of external parameters on clustering results.


## 2.4.2. Replacement of Cluster Center

Another defect of traditionalk-means algorithm is that it is very sensitive to outliers of dataset. In fact, some initial cluster centers generated by traditional k-means algorithm are not real cluster centers in the target dataset (this paper calls these points “pseudocenters”). In addition, the position of the generated cluster center will deviate from that of the actual cluster center due to the influence of outliers. This problem will seriously reduce the accuracy of traditional k-means algorithm.The center generated byk-medoids clustering algorithm is always the real data point of the target dataset. Inspired by k-medoids algorithm, this paper proposes to update the pseudocenters generated by traditional k-means algorithm by using center replacement method. Once the k-means algorithm creates a pseudocenter for a class cluster, it will be replaced by the nearest point in the class cluster. At the same time, the neighboring point should be as far away from the outliers of this cluster as possible. In the process of clustering, the pseudocluster centers are updated in turn until all the real cluster centers are specified.Figure2 shows the replacement process of clusters containing outliers and their corresponding pseudocenters. In Figure 2, the blue dots represent normal data objects and the red dots represent outliers. Figure 2(a) shows a dataset composed of three clusters randomly generated by Python software. The cluster at the bottom left of Figure 2(a) contains an outlier represented by a red dot. Figure 2(b) shows the replacement process of the center point of this kind of cluster. Without outlier interference, the traditional k-means algorithm takes the object represented by the black rectangle as the cluster center. However, if the outliers in the cluster are considered, the obtained cluster center will deviate from the “actual” cluster center. As shown in Figure 2(b), along the arrow direction, the center of the cluster moves from the position of the black rectangle to the position of the green rectangle. This deviation will lead to the performance degradation of clustering algorithm. In fact, with the deviation of cluster center, many data objects that do not belong to this cluster will be included in the next iteration of clustering algorithm. In Figure 2(b), this paper uses an improved method to take the blue dot in the red rectangular box as the final cluster center. The center is the actual data object, which is closest to the black rectangle and as far away from the red outlier as possible.Figure 2
Replacement of outliers and pseudocenters.
(a)(b)


## 2.4.3. DCk-Means Process and Time Analysis

The flow of DCk-means algorithm is shown in Algorithm 1. DC k-means algorithm can not only find the center of initial cluster stably but also can deal with outliers. In Algorithm 1: (1) calculate the dynamic average distance between all data objects in dataset D. (2) Calculate the density parameters of all data objects. (3) Find k initial cluster centers of dataset D and put them into set V according to the density parameter. Steps (4)–(8) realize the final division of dataset D. Specifically, step (5) initializes each cluster. (6) Put the data object into the corresponding class cluster. (7) Update the cluster center by using the center replacement method.Input: datasetD=y1,y2,⋯,yn, number of clusters K.Output:C=C1,C2,⋯,CK of dataset D.Algorithm:(1)
Calculate the dynamic average distance (Divests) between any pair of data objects yp,yq in dataset D(2)
Forp=1,2,⋯,n, do calculate the density parameter ρyp,DyAveDpst of the data object yp(3)
Fork=1,2,⋯,K, do//find k initial cluster centers and put them into the initial cluster center set V. Select the data object y with the highest density parameter from dataset D, and delete all data objects about y from dataset D. Set y as the center of the kth initial cluster and vk. V⟵vk;//put vk into set V in the center of the initial cluster(4)
Repeat(5)
LetCk=∅1≤k≤K//initialize each cluster Ck(6)
Forp=1,2⋯,n do//put each data object in D into the corresponding cluster. Calculate the distance between the centers of each cluster in data objects yp and V. Put yp into the corresponding class cluster according to the nearest principle(7)
Fork=1,2,⋯,K, do//update the center of each cluster. Calculate the distance between the center vk of the cluster Ck and other data objects in the cluster; find the nearest data object (vk′) to vk. At the same time, vk′ should be as far away from the outliers in Ck as possible. If vk≠vk′vk⟵vk′//vk′ is updated as the new center of class Ck(8)
Until∑i=1K∑X∈Cidvi,x2 converted//until the standard function ∑i=1K∑X∈Cidvi,x2 converges to a constant, at which point vk is the new center of class CkAssume that there aren data objects in dataset D=y1,y2,⋯,yn. Every data object yi=yi1,yi2,⋯,yim is a dimension vector of m. The DC k-means algorithm will divide dataset D into k clusters C=C1,C2,⋯,CK through h iterations.According to the individual’s theoretical and practical ability, BP neural network divides the learning ability of ideological and political education into nine levels. Subjective and abstract indicators are standardized, making individuals more different. It is found that the factors significantly related to the evaluation scores of ideological and political learning abilities are interest, guidance and learning relationship, industry help, project difficulty, innovation degree, teachers’ level, supervision factors, evaluation system, and learning atmosphere. Those factors that have significant correlation and difference with the ideological and political learning ability and the evaluation score of the ideological and political learning ability are selected as cluster variables so that there are significant differences among all kinds, and the significance of cluster analysis is clarified. In the experimental part, DCk-means cluster analysis will be used to classify different research individuals, and according to the characteristics of each category, targeted suggestions will be put forward for their graduate students to improve their ideological and political learning ability.


## 3. Experiment and Analysis

### 3.1. Experimental Configuration and Indicators

The experimental code is written by Python language, aiming to verify the actual effect of this algorithm in the analysis of learning ability of ideological and political courses in colleges and universities. The specific software and hardware configuration environment of the experiment is listed in Table5.Table 5
Software and hardware configuration environment of the experiment.
CPUInter(R) Core (TM) i7-8565U CPU @ 1.80 GHzRAMLPDDR3 2133 MHz (8 GB)Hard diskNVMe PCIe high-speed solid-state driveOSMicrosoft Windows 10 Enterprise (64 bit)The experimental dataset for verifying DCk-means clustering algorithm consists of 8 simulation datasets and 8 UCI real machine learning datasets, as shown in Table 6. The data used to verify the ideological and political ability analysis algorithm in this paper consists of real student data collected in Section 2.1.Table 6
Description of 8 simulated datasets and 8 UCI real machine datasets.
DatasetsPoints numberCluster numberDimensionNormal20052D90090092R15600152N72800072K310200032Curve18032Pathbased30032Semicircle30032Iris15034Seeds21037Haberman30623Column31036Hayes-Roth13235Ionosphere351234PageB locks5473510Magic19020210


### 3.2. Performance Indicators

The accuracy of clustering results can usually be measured by external evaluation indexes, such asF-measure, entropy, and purity. This paper uses purity index to evaluate the accuracy of clustering results, which is defined as
(9)purity=∑p=1KCpnmaympqCp,whereCp is the number of all data objects in the cluster Cp. mpq is the number of members of class cluster Cp belonging to class cluster Cq. K is the number of clusters in the target dataset. n is the number of data objects contained in the target dataset. In this paper, the value of purity index is converted into percentage for comparison.


### 3.3. Comparative Experiment

In the experiment, the clustering results generated by different datasets are evaluated.Table7 lists the processing accuracy of k-medoids, k-means++, and DC k-means for the 16 datasets listed in Table 6. The DC k-means algorithm can keep the same result every time, so it only needs to be run once. On the contrary, the accuracy of the other two algorithms is the average of 10 repeated experiments. As can be seen from Table 6, since the center of the initial cluster is randomly selected, the accuracy of k-medoids algorithm is the worst among the three algorithms. In k-means++ algorithm, except for the first initial cluster center, other cluster centers are no longer randomly selected. Therefore, the accuracy of k-means++ algorithm is better than that of k-medoids algorithm. DC k-means introduces the density parameter to select the initial cluster center and adopts the center replacement strategy in the update stage. Therefore, the clustering accuracy of DC k-means is the best among the three clustering algorithms, indicating the effectiveness of the improved k-means clustering algorithm designed in this paper.Table 7
Comparison of precision purity of different algorithms.
Datasetsk-medoidsk-means++DCk-meansNormal68.5282.5799.5D90075.2981.1399.78R1573.2292.2499.67N782.388.16100K386.986.9100Curve67.589.9199.22Pathbased61.4275.2775.25Semicircle88.05100100Iris77.0983.2292.67Seeds69.6476.5589.12Haberman72.9273.3186.97Column70.4172.2572.31Hayes-Roth43.3747.9947.99Ionosphere67.1271.3372.53PagcBIocks91.0390.9992.8Magic65.8966.0966.48


### 3.4. Feasibility Analysis

According to the individual’s theoretical and practical ability, the learning ability is divided into 9 levels by BP neural network, which standardizes subjective and abstract indicators, thus making individuals more different. Through correlation analysis, it is found that the factors significantly related to the evaluation score of ideological and political learning ability are interest, guidance and learning relationship, industry help, project difficulty, innovation degree, teachers’ level, supervision factors, evaluation system, and learning atmosphere. These factors with significant correlation and difference with ideological and political learning ability and the evaluation score of ideological and political learning ability are selected as cluster variables to make significant differences between various types, so as to clarify the significance of cluster analysis. The following uses the improved cluster analysis method to classify different research individuals and puts forward targeted suggestions for their graduate students to improve their ideological and political learning ability according to the characteristics of each category.According to Table8, among the preliminarily determined influencing factors, only gender, research significance, and teaching facilities have little influence on ideological and political learning ability. Therefore, the remaining nine factors and dependent variables that are significantly related to the ideological and political learning ability are selected into the classification variables of cluster analysis.Table 8
Summary of correlation of influencing factors.
ProjectInterestTeacher levelDegree of innovationP value0.0070.010.009ProjectGenderLearning relationshipEvaluation systemP value0.2830.0090.007ProjectResearch significanceTeaching facilitiesLearning atmosphereP value0.1310.8780.003ProjectSupervising workDifficulty degree of subjectIndustry helpP value0.0050.010Table 9
Final cluster center.
Cluster12345Learning ability evaluation score78141InterestHighHighLowLowLowLearning relationshipVery harmoniousGeneral harmonyCommonCommonGeneral harmonyIndustry helpCommonEnormousSmallerLargerEnormousDifficulty degree of subjectEasyDifficultEasyDifficultDifficultDegree of innovationLowHighLowLowHighSupervision factorAccurate and timelyAccurate and timelyAccurate and timelyNeed to be improvedNeed to be improvedLearning atmosphereGoodGoodCommonGoodCommonTeacher levelHigherCommonHigherHigherHigherEvaluation systemImperfectionImproveImproveImproveImproveThe sum of squares within the group represents the sum of squares of errors of the sample data and their mean values of each level or group, which reflects the dispersion of the observed values of each sample, also known as the sum of squares of errors. In this study, the sum of squares within each group is obtained by using Python language.(10)SE=∑p=1r∑q=1npypq−y¯p2,whereypq is a random variable within the group. yp is the sample mean, and n is the sample size.Cluster the above selected 10 factors, and calculate the sum of squares within the group corresponding to different cluster numbers, as shown in Figure3. When the cluster number is 5, the sum of squares within the group basically does not change, so the cluster number k in this study is 5.Figure 3
Sum of squares in value group under different clustering numbers.After 50 iterations and reclassification, the final clustering results are as follows.


### 3.5. Clustering Results and Related Suggestions

In order to improve the learning ability of postgraduates, this paper classifies postgraduates into 5 categories by cluster analysis based on the evaluation scores of each postgraduates’ influencing factors on learning ability. Finally, according to the characteristics of each category, it puts forward specific suggestions for postgraduates to improve their learning ability. The results are as follows.The first category: the theoretical knowledge of general industries. For this type of talents, we should start to create opportunities for practical application and encourage them to apply the theoretical knowledge they have learned to practice.The second category: all-round knowledge-based high-end industries. The industry in which this type of talents is located has the highest requirements for ideological and political learning ability, and the difficulty and innovation degree of the research topics are high. For this class, the most important thing is to equip a strong team of teachers to improve their mathematical research ability.The third category: other knowledge types in the literary industry. These individuals are at the lowest level in theoretical achievement and practical ability. For this kind of talents, cultivating interest in ideological and political learning is the easiest way to achieve.The fourth category: the theoretical knowledge of middle-end industries. For this type of graduate students, schools should carry out more activities in ideological and political practice and improve ideological and political literacy to cultivate interest in learning.The fifth category: other knowledge-based industries in high-end industries. This type of industry has a high demand for ideological and political education. For this type of graduate students, schools should also carry out more practical activities and lectures on improving literacy to cultivate interest and improve the atmosphere of learning.


## 3.1. Experimental Configuration and Indicators

The experimental code is written by Python language, aiming to verify the actual effect of this algorithm in the analysis of learning ability of ideological and political courses in colleges and universities. The specific software and hardware configuration environment of the experiment is listed in Table5.Table 5
Software and hardware configuration environment of the experiment.
CPUInter(R) Core (TM) i7-8565U CPU @ 1.80 GHzRAMLPDDR3 2133 MHz (8 GB)Hard diskNVMe PCIe high-speed solid-state driveOSMicrosoft Windows 10 Enterprise (64 bit)The experimental dataset for verifying DCk-means clustering algorithm consists of 8 simulation datasets and 8 UCI real machine learning datasets, as shown in Table 6. The data used to verify the ideological and political ability analysis algorithm in this paper consists of real student data collected in Section 2.1.Table 6
Description of 8 simulated datasets and 8 UCI real machine datasets.
DatasetsPoints numberCluster numberDimensionNormal20052D90090092R15600152N72800072K310200032Curve18032Pathbased30032Semicircle30032Iris15034Seeds21037Haberman30623Column31036Hayes-Roth13235Ionosphere351234PageB locks5473510Magic19020210


## 3.2. Performance Indicators

The accuracy of clustering results can usually be measured by external evaluation indexes, such asF-measure, entropy, and purity. This paper uses purity index to evaluate the accuracy of clustering results, which is defined as
(9)purity=∑p=1KCpnmaympqCp,whereCp is the number of all data objects in the cluster Cp. mpq is the number of members of class cluster Cp belonging to class cluster Cq. K is the number of clusters in the target dataset. n is the number of data objects contained in the target dataset. In this paper, the value of purity index is converted into percentage for comparison.


## 3.3. Comparative Experiment

In the experiment, the clustering results generated by different datasets are evaluated.Table7 lists the processing accuracy of k-medoids, k-means++, and DC k-means for the 16 datasets listed in Table 6. The DC k-means algorithm can keep the same result every time, so it only needs to be run once. On the contrary, the accuracy of the other two algorithms is the average of 10 repeated experiments. As can be seen from Table 6, since the center of the initial cluster is randomly selected, the accuracy of k-medoids algorithm is the worst among the three algorithms. In k-means++ algorithm, except for the first initial cluster center, other cluster centers are no longer randomly selected. Therefore, the accuracy of k-means++ algorithm is better than that of k-medoids algorithm. DC k-means introduces the density parameter to select the initial cluster center and adopts the center replacement strategy in the update stage. Therefore, the clustering accuracy of DC k-means is the best among the three clustering algorithms, indicating the effectiveness of the improved k-means clustering algorithm designed in this paper.Table 7
Comparison of precision purity of different algorithms.
Datasetsk-medoidsk-means++DCk-meansNormal68.5282.5799.5D90075.2981.1399.78R1573.2292.2499.67N782.388.16100K386.986.9100Curve67.589.9199.22Pathbased61.4275.2775.25Semicircle88.05100100Iris77.0983.2292.67Seeds69.6476.5589.12Haberman72.9273.3186.97Column70.4172.2572.31Hayes-Roth43.3747.9947.99Ionosphere67.1271.3372.53PagcBIocks91.0390.9992.8Magic65.8966.0966.48


## 3.4. Feasibility Analysis

According to the individual’s theoretical and practical ability, the learning ability is divided into 9 levels by BP neural network, which standardizes subjective and abstract indicators, thus making individuals more different. Through correlation analysis, it is found that the factors significantly related to the evaluation score of ideological and political learning ability are interest, guidance and learning relationship, industry help, project difficulty, innovation degree, teachers’ level, supervision factors, evaluation system, and learning atmosphere. These factors with significant correlation and difference with ideological and political learning ability and the evaluation score of ideological and political learning ability are selected as cluster variables to make significant differences between various types, so as to clarify the significance of cluster analysis. The following uses the improved cluster analysis method to classify different research individuals and puts forward targeted suggestions for their graduate students to improve their ideological and political learning ability according to the characteristics of each category.According to Table8, among the preliminarily determined influencing factors, only gender, research significance, and teaching facilities have little influence on ideological and political learning ability. Therefore, the remaining nine factors and dependent variables that are significantly related to the ideological and political learning ability are selected into the classification variables of cluster analysis.Table 8
Summary of correlation of influencing factors.
ProjectInterestTeacher levelDegree of innovationP value0.0070.010.009ProjectGenderLearning relationshipEvaluation systemP value0.2830.0090.007ProjectResearch significanceTeaching facilitiesLearning atmosphereP value0.1310.8780.003ProjectSupervising workDifficulty degree of subjectIndustry helpP value0.0050.010Table 9
Final cluster center.
Cluster12345Learning ability evaluation score78141InterestHighHighLowLowLowLearning relationshipVery harmoniousGeneral harmonyCommonCommonGeneral harmonyIndustry helpCommonEnormousSmallerLargerEnormousDifficulty degree of subjectEasyDifficultEasyDifficultDifficultDegree of innovationLowHighLowLowHighSupervision factorAccurate and timelyAccurate and timelyAccurate and timelyNeed to be improvedNeed to be improvedLearning atmosphereGoodGoodCommonGoodCommonTeacher levelHigherCommonHigherHigherHigherEvaluation systemImperfectionImproveImproveImproveImproveThe sum of squares within the group represents the sum of squares of errors of the sample data and their mean values of each level or group, which reflects the dispersion of the observed values of each sample, also known as the sum of squares of errors. In this study, the sum of squares within each group is obtained by using Python language.(10)SE=∑p=1r∑q=1npypq−y¯p2,whereypq is a random variable within the group. yp is the sample mean, and n is the sample size.Cluster the above selected 10 factors, and calculate the sum of squares within the group corresponding to different cluster numbers, as shown in Figure3. When the cluster number is 5, the sum of squares within the group basically does not change, so the cluster number k in this study is 5.Figure 3
Sum of squares in value group under different clustering numbers.After 50 iterations and reclassification, the final clustering results are as follows.


## 3.5. Clustering Results and Related Suggestions

In order to improve the learning ability of postgraduates, this paper classifies postgraduates into 5 categories by cluster analysis based on the evaluation scores of each postgraduates’ influencing factors on learning ability. Finally, according to the characteristics of each category, it puts forward specific suggestions for postgraduates to improve their learning ability. The results are as follows.The first category: the theoretical knowledge of general industries. For this type of talents, we should start to create opportunities for practical application and encourage them to apply the theoretical knowledge they have learned to practice.The second category: all-round knowledge-based high-end industries. The industry in which this type of talents is located has the highest requirements for ideological and political learning ability, and the difficulty and innovation degree of the research topics are high. For this class, the most important thing is to equip a strong team of teachers to improve their mathematical research ability.The third category: other knowledge types in the literary industry. These individuals are at the lowest level in theoretical achievement and practical ability. For this kind of talents, cultivating interest in ideological and political learning is the easiest way to achieve.The fourth category: the theoretical knowledge of middle-end industries. For this type of graduate students, schools should carry out more activities in ideological and political practice and improve ideological and political literacy to cultivate interest in learning.The fifth category: other knowledge-based industries in high-end industries. This type of industry has a high demand for ideological and political education. For this type of graduate students, schools should also carry out more practical activities and lectures on improving literacy to cultivate interest and improve the atmosphere of learning.


## 4. Conclusion

The ideological and political theory course in colleges and universities is the main channel to strengthen and improve the ideological and political education of college students. This paper proposes an analysis algorithm based on BP neural network and improvedk-means clustering, aiming to realize the research of students’ innovative ability in ideological and political course. The algorithm collects the influencing factors of ideological and political learning ability. And BP neural network is used to quantify the learning ability and solve the problem of index weight. In the meantime, it avoids artificial subjective factors and ensures the reliability of evaluation results. Then, the correlation analysis screens out the influence of ideological and political learning ability on privacy. Finally, an improved DC k-means clustering algorithm is designed, which is applied to cluster-related ideological and political research individuals. The experimental results demonstrate that the improved clustering algorithm designed in this paper has high clustering accuracy. This paper can effectively analyze the learning ability of ideological and political course based on BP neural network and improved k-means clustering analysis algorithm. Finally, specific suggestions for each type of individual are listed out. The future research direction is to study the parameter model optimization method of BP neural network to further improve the accuracy of learning ability analysis.



---

*Source: 4397555-2022-03-21.xml*