# Research on the Mental Health of College Students Based on Fuzzy Clustering Algorithm

Authors: Qinghua Tang; Yixuan Zhao; Yujia Wei; Lu Jiang
Journal: Security and Communication Networks
 (2021)

---

## Abstract

The mental health of young college students has always been a social concern. Strengthening the supervision of college students’ mental health problems is an important research content. In this regard, this paper proposes to apply fuzzy cluster analysis to the health analysis of college students and explore college students through fuzzy clustering. Explore the potential relationship between the factors that affect the health of college students, and this will provide a reference for the early prevention and intervention of college students’ mental health problems. In view of this, an improved fuzzy clustering method based on the firefly algorithm is proposed. First, the Chebyshev diagram is introduced into the firefly algorithm to initialize the population distribution. Then, an adaptive step size method is proposed to balance exploration and development capabilities. Finally, in the local search process, a Gaussian perturbation strategy is added to the optimal individual in each iteration to make it jump out of the local optimal. The process has good optimization capabilities and is easy to obtain the global optimal value. It can be used as the initial center of the fuzzy C-means clustering algorithm for clustering, which can effectively enhance the robustness of the algorithm and improve the global optimization ability. In order to evaluate the effectiveness of the algorithm, comparative experiments were carried out on four datasets, and the experimental results show that the algorithm is better than the comparison algorithm in clustering accuracy and robustness.


---

## Body

## 1. Introduction

Clustering technology divides datasets into different categories and data between categories. The differences are large, and the differences within the same category are as small as possible. According to the National Center for Disease Control and Prevention and the Center for Mental Health, survey data show 10%–25.4% of college students are interested in questions. The former State Education Commission has conducted psychological tests and investigations on 12,600 college students, and 20.23% of them had obvious psychological problems. Every year in the university, more than 10 students take their own humiliation in China due to broken relationships, interpersonal tensions, frustrations in life, etc. It is estimated that psychological problems are leading to college students taking a break from school, dropping out of school, and doing other evil things. It can be seen that psychological problems have a serious influence on college students’ health growth [1]. To strengthen the psychological health education of college students, and to cultivate the moral and physical health of students, is the new task of high school education. In recent years, the psychological health of college students has become a focal point of the whole society due to the frequent occurrence of evil incidents caused by the psychological problems of college students. Experts at home and abroad have also done a lot of in-depth research on this and actively explore college students’ psychological guidance and intervention model. Some developed countries in the west attach great importance to the mental health education of young students [2]. They analyze the psychological data of students by means of measurement, mathematical statistics, methods, and tools. In order to guide psychological teaching assistants to give students psychological guidance with acupuncture, they need to conduct rigorous training [3]. In the past, the emphasis on the psychological health education of Chinese university students has been increasing. At the same time, the education departments at all levels have done a lot of work around the psychological health education of college students. At the same time, through a variety of assessment measures, understand the importance of mental health education in the management of high school students and quality education [4].However, there are still many problems in the development of mental health education in domestic colleges and universities, which need to be further strengthened and improved, such as the uneven development of various colleges and universities. The relevant institutions for the test are not standardized enough, the psychological test data are relatively single, and the tutor resources are not sufficient enough. In this paper, the model clustering analysis should be used in the analysis of college students’ mental health, through the model clustering, to analyze the rules and characteristics of college students’ mental health and the behavior characteristics of students with mental disabilities [5]. Explore various potential relationships between psychological test data, and provide scientific basis for universities to establish and improve early prevention and intervention of students' psychological barriers [6].Cluster analysis is an important technology in the field of data mining. By using it to find the similarity and difference between data, we can further mine the potential relationship between data [7]. With the deepening of understanding and the needs of practical application, the boundaries between real data objects are often not obvious, not an either or relationship [8]. They have a certain fuzziness. If the clustering analysis method is used to realize the classification of some data, it will cause great errors [9].Fuzzy clustering analysis provides the possibility for the classification of fuzzy things. In 1966, Bellman, Kalaba, and Zadehw first proposed to deal with clustering problems based on fuzzy sets. Later, Wee, Flak and Turner, Gitman, and Levine also used fuzzy sets to study classification problems [10]. In 1969, Ruspini defined the concept of fuzzy partition of dataset for the first time; fuzzy clustering is systematically expressed and studied [11].Scholars try to study fuzzy clustering from many aspects and also put forward many fuzzy clustering methods, such as the relaxed k-nearest neighbor method proposed by Taogu and Bubulsson. Leahy put forward the clustering method of optimal graph theory, Kler et al. [12] proposed a fuzzy k-nearest neighbor method, and Bezdek et al. proposed a fuzzy k-nearest neighbor method, esogbue’s dynamic fuzzy clustering method [13].The most widely used method in practical application is the fuzzy clustering method based on objective function first proposed by Ruspini. Later, Duim and Bezdek extended the hard C-means clustering algorithm to the fuzzy state [14], established the fuzzy C-means clustering theory, verified the convergence of fuzzy C-means (FCM) algorithm, and really proposed an effective method. So far, scholars have deeply explored the fuzzy clustering algorithm based on objective function from various aspects, such as improving the convergence speed of FCM algorithm, modifying the objective function and fuzzy partition space, and fuzzy clustering of noisy data and mixed data. The convergence and stopping criteria of the FCM algorithm are one of the important characteristics, the fuzzy clustering algorithm is sensitive to initialization and difficult to achieve global optimization, and remarkable results have been achieved [15].The amount of data stored in the University Yeli health database is increasing. These data contain a lot of information that can prevent students’ Yeli barriers in the early stage. Timely, efficient, accurate, and systematic analysis of this information will greatly improve the efficiency of college students’ health education [16]. Fuzzy cluster analysis has a good application in three aspects. It will integrate relevant technologies and provide a scientific reference for practical decision-making.The main contributions of this paper are as follows:Based on the classical fuzzy C-means (FCM) clustering algorithm, a FCM algorithm based on information entropy attribute weighting is proposed, which solves the defects of FCM algorithm, such as very sensitive to initialization, easy to fall into local convergence, unable to achieve global optimization, and unable to deal with under-regular datasets. Firstly, the information entropy theory is introduced to initialize the cluster center [17]. Secondly, the idea of class merging is used to continuously adjust the position of the initial cluster center and determine the final clustering center. Finally, the idea of attribute weighting is introduced to solve the problem of local convergence and achieve the global minimum. The improved algorithm will greatly improve the efficiency and accuracy of the original algorithm [18].The research innovations of this paper are as follows:(1)
This article proposes to apply fuzzy clustering analysis to the health analysis of college students and to explore the laws and characteristics of college students’ health through fuzzy clustering.(2)
An improved fuzzy clustering method based on the firefly algorithm is proposed.(3)
The Chebyshev diagram is introduced in the firefly algorithm to initialize the population distribution. Then, an adaptive step size method is proposed to balance exploration and development capabilities.The fuzzy clustering algorithm based on information attribute weighting is applied to the analysis of college students’ mental health data. Firstly, the theoretical rationality of the algorithm is analyzed, and the specific data analysis test is performed. The advantages of the algorithm compared with the fuzzy C-means algorithm are analyzed through experiments. At the same time, the class structure hidden in the mental health data attribute is excavated, and the main factors affecting college students’ mental health are analyzed, which is convenient for the school to analyze and adjust the work ideas of private mental health education and formulate corresponding psychological intervention measures [19].


## 2. Analysis of College Students’ Mental Health

### 2.1. Mental Health of College Students

Freshmen studying in Xinyang University are in a critical period of shaping and forming life values, and it is also a period of rapid growth and development. At this time, different steps of psychological and physiological growth and social change and development are bound to induce psychological obstacles. Understanding the overall mental health status of freshmen in colleges and universities is of great significance to comprehensively promote students’ quality education.


### 2.2. Mental Health Implications

Due to the various forms of mental health, there is no unified standard for mental health. Based on various studies, psychologists believe that mental health includes the following seven aspects: normal intelligence, emotional health, sound will, behavior coordination, interpersonal adaptation, moderate response, and psychological characteristics in line with age.


### 2.3. College Student Personality Questionnaire

University Personality Inventory (UFI) is a kind of mental health questionnaire for college students, which aims to find and treat students with psychological problems early. The personality questionnaire of college students is mainly used as a specific survey of the mental health status of freshmen when they enter school, so as to better understand the psychological and mental health status of students and help psychological counseling teachers find students with psychological problems as soon as possible and timely provide targeted psychological guidance and corresponding psychological crisis intervention measures for these college students.The classification and processing of UPI results are combined with test results and actual diagnosis; students are divided into three categories: A, B, and C, which respectively represent obvious psychological abnormalities, general psychological problems, and normal psychology. How to judge the three categories A, B, and C is mainly based on the experience of psychological counselors.


### 2.4. Symptom Self-Assessment Form

SCL-90 symptom checklist is the most widely used scale in mental health testing and measurement. The scale was compiled by Derogatis of Germany in 1975. It contains 90 questions. The contents of the questions range from simple and basic to trait changes. It comprehensively evaluates a person’s psychological symptoms and their severity. It has the advantages of large amount of data, wide coverage of symptoms, and more accurate and comprehensive description of the subjects’ conscious symptoms.The scale includes 90 items and 9 subscales in total. Each item of the scale is scored at level 1–5 (no, very light, medium, heavy, and serious). There is no rigid provision on the specific meaning.A total of 4186 students of grade 2015 of Xinyang University participated in the psychological test, including students from eight departments: Foreign Language Department, Chinese Department, Mathematics and Computer Department, Science and Engineering Department, Economic Management Department, Social Science Department, Wood Engineering Department, and Art Department. 4161 valid test data are mainly referred to this time.


### 2.5. Data Preprocessing

#### 2.5.1. Data Selection

In the mental health data obtained from the test, due to the uniqueness of attribute values such as student number, gender, and test answer, the grade is 2015, and the test is a unified date; these attributes have no impact on the clustering results and only increase the complexity of calculation. Delete some attributes directly during clustering.


#### 2.5.2. Data Cleaning

Data cleaning is to deal with the missing value of the data part. For example, in the case of a small amount of data, add a value to the missing value according to the distribution law of the data value. In the case of a large amount of data, W can be replaced by a constant value. For some students’ basic information, such as family name and department, the missing value of the genus can be substituted by 0. After the data cleaning, delete the invalid data and replace the useful missing data.


#### 2.5.3. Establishing the Database and Data Table for College Students

In the process of cluster analysis, data collection is the first step, followed by data preprocessing and clearing up invalid data. Establish a database of psychological well-being for college students. The data of this paper are obtained from the personality test of 2015 college students of Xinyang University and the Symptom Self-Rating Scale of CSX-90, in which the symptom self-rating scale set contains ten factors. Each factor reflects a particular aspect of a person’s symptoms.


#### 2.5.4. Algorithm Implementation Process

College students’ health data analysis: the first is to collect college students’ health data, through the selection and cleaning of data attributes and integrate effective data to establish a comprehensive private health testing database. The data were clustered using the FCM algorithm based on the attribution weighting of information. The clustering analysis process of college students’ health data is shown in Figure1.Figure 1
The clustering analysis process of college students’ health data.


## 2.1. Mental Health of College Students

Freshmen studying in Xinyang University are in a critical period of shaping and forming life values, and it is also a period of rapid growth and development. At this time, different steps of psychological and physiological growth and social change and development are bound to induce psychological obstacles. Understanding the overall mental health status of freshmen in colleges and universities is of great significance to comprehensively promote students’ quality education.


## 2.2. Mental Health Implications

Due to the various forms of mental health, there is no unified standard for mental health. Based on various studies, psychologists believe that mental health includes the following seven aspects: normal intelligence, emotional health, sound will, behavior coordination, interpersonal adaptation, moderate response, and psychological characteristics in line with age.


## 2.3. College Student Personality Questionnaire

University Personality Inventory (UFI) is a kind of mental health questionnaire for college students, which aims to find and treat students with psychological problems early. The personality questionnaire of college students is mainly used as a specific survey of the mental health status of freshmen when they enter school, so as to better understand the psychological and mental health status of students and help psychological counseling teachers find students with psychological problems as soon as possible and timely provide targeted psychological guidance and corresponding psychological crisis intervention measures for these college students.The classification and processing of UPI results are combined with test results and actual diagnosis; students are divided into three categories: A, B, and C, which respectively represent obvious psychological abnormalities, general psychological problems, and normal psychology. How to judge the three categories A, B, and C is mainly based on the experience of psychological counselors.


## 2.4. Symptom Self-Assessment Form

SCL-90 symptom checklist is the most widely used scale in mental health testing and measurement. The scale was compiled by Derogatis of Germany in 1975. It contains 90 questions. The contents of the questions range from simple and basic to trait changes. It comprehensively evaluates a person’s psychological symptoms and their severity. It has the advantages of large amount of data, wide coverage of symptoms, and more accurate and comprehensive description of the subjects’ conscious symptoms.The scale includes 90 items and 9 subscales in total. Each item of the scale is scored at level 1–5 (no, very light, medium, heavy, and serious). There is no rigid provision on the specific meaning.A total of 4186 students of grade 2015 of Xinyang University participated in the psychological test, including students from eight departments: Foreign Language Department, Chinese Department, Mathematics and Computer Department, Science and Engineering Department, Economic Management Department, Social Science Department, Wood Engineering Department, and Art Department. 4161 valid test data are mainly referred to this time.


## 2.5. Data Preprocessing

### 2.5.1. Data Selection

In the mental health data obtained from the test, due to the uniqueness of attribute values such as student number, gender, and test answer, the grade is 2015, and the test is a unified date; these attributes have no impact on the clustering results and only increase the complexity of calculation. Delete some attributes directly during clustering.


### 2.5.2. Data Cleaning

Data cleaning is to deal with the missing value of the data part. For example, in the case of a small amount of data, add a value to the missing value according to the distribution law of the data value. In the case of a large amount of data, W can be replaced by a constant value. For some students’ basic information, such as family name and department, the missing value of the genus can be substituted by 0. After the data cleaning, delete the invalid data and replace the useful missing data.


### 2.5.3. Establishing the Database and Data Table for College Students

In the process of cluster analysis, data collection is the first step, followed by data preprocessing and clearing up invalid data. Establish a database of psychological well-being for college students. The data of this paper are obtained from the personality test of 2015 college students of Xinyang University and the Symptom Self-Rating Scale of CSX-90, in which the symptom self-rating scale set contains ten factors. Each factor reflects a particular aspect of a person’s symptoms.


### 2.5.4. Algorithm Implementation Process

College students’ health data analysis: the first is to collect college students’ health data, through the selection and cleaning of data attributes and integrate effective data to establish a comprehensive private health testing database. The data were clustered using the FCM algorithm based on the attribution weighting of information. The clustering analysis process of college students’ health data is shown in Figure1.Figure 1
The clustering analysis process of college students’ health data.


## 2.5.1. Data Selection

In the mental health data obtained from the test, due to the uniqueness of attribute values such as student number, gender, and test answer, the grade is 2015, and the test is a unified date; these attributes have no impact on the clustering results and only increase the complexity of calculation. Delete some attributes directly during clustering.


## 2.5.2. Data Cleaning

Data cleaning is to deal with the missing value of the data part. For example, in the case of a small amount of data, add a value to the missing value according to the distribution law of the data value. In the case of a large amount of data, W can be replaced by a constant value. For some students’ basic information, such as family name and department, the missing value of the genus can be substituted by 0. After the data cleaning, delete the invalid data and replace the useful missing data.


## 2.5.3. Establishing the Database and Data Table for College Students

In the process of cluster analysis, data collection is the first step, followed by data preprocessing and clearing up invalid data. Establish a database of psychological well-being for college students. The data of this paper are obtained from the personality test of 2015 college students of Xinyang University and the Symptom Self-Rating Scale of CSX-90, in which the symptom self-rating scale set contains ten factors. Each factor reflects a particular aspect of a person’s symptoms.


## 2.5.4. Algorithm Implementation Process

College students’ health data analysis: the first is to collect college students’ health data, through the selection and cleaning of data attributes and integrate effective data to establish a comprehensive private health testing database. The data were clustered using the FCM algorithm based on the attribution weighting of information. The clustering analysis process of college students’ health data is shown in Figure1.Figure 1
The clustering analysis process of college students’ health data.


## 3. IFAFCM Algorithm

### 3.1. FCM Algorithm

FCM is a common clustering algorithm that distributes sample data according to their membership degree. Its objective function formula is shown in the following formula:(1)JFCMU,V=∑i=1c∑j=1nui,jmdij2.Here,n represents the total number of samples, and its sample dataset X=x1,x2,…,xn, xj=xj1,xj2,…,xjs represents s attributes of the j-th sample; C represents the number of cluster centroid, V=v1,v2,…,vc represents the centroid set; element ui,j represents the size of the j-th sample belonging to the center of mass I, and m represents the fuzzy index, usually taking a constant value of 2; and dij is the Euclidean distance from each sample to the cluster center. The membership matrix uij and the centroid matrix vi are calculated as shown in the following equations:(2)uij=1∑k=1Cdij/dkj2/m−1,(3)vi=∑j=1nuijmxj∑j=1nuijm.


### 3.2. FA Algorithm

As a swarm intelligence optimization algorithm, FA has more advantages than particle swarm optimization and genetic algorithm in global optimization [17–19]. The algorithm searches and optimizes fixed space by simulating the process of attraction and movement between fireflies in nature. The firefly makes the darker individuals move to the brighter ones through its own fluorescein luminescence, and finally all the individuals tend to the brightest firefly, and its position is the optimal position in the search space. The luminance, attractiveness, and position update formulas for fireflies are described by the following definitions.Definition 1.
The relative fluorescence of two fireflies is shown in the following formula:(4)I=I0e−γijr.
Here,I0 represents the highest fluorescence brightness obtained when γ=0, and the better the objective function value is, the higher the brightness will be; γ represents the absorption coefficient of light intensity as the distance between the two fireflies increases, indicating that the fluorescence is gradually weakened by the air medium; and rij represents the distance between firefly i and firefly j. The calculation formula is shown as formula (5), and s represents the dimension:(5)rij=xi－xj=∑l=1xxil－xjl2.Definition 2.
The attraction degree of fireflies is shown in the following formula:(6)β=β0e−γrij2.
Here,β0 represents the maximum attraction, that is, the attraction when r = 0, γ is the same as above.Definition 3.
The firefly position update formula is shown as the following formula:(7)sit+1=sit+βsjt−sit+αrand−0.5.
Here,si and sj are the positions of firefly i and j in the search space, respectively; t represents the number of iterations; β is the attractiveness; α is the step factor, its value range is in the interval [0, 1], where the value is a constant; and rand is the random factor, which is the random number on the interval [0, 1].


### 3.3. Improved Firefly Algorithm

#### 3.3.1. Chebyshev Maps

In order to verify the effectiveness of Chebyshev chaotic mapping, the Chebyshev chaotic mapping method was used to evenly distribute 20 two-dimensional particles into the three-dimensional plane formed by functionz (as shown in Figure 2) and compared with the three-dimensional graph of traditional randomly distributed particle swarm optimization (as shown in Figure 3). The expression of function z is shown in the following formula:(8)z=31−x2e−y2−x+12.Figure 2
Chebyshev chaotic map distribution.Figure 3
Traditional random distribution.By comparing Figure2 with Figure 3, it can be seen that Chebyshev mapping method can evenly distribute the initial firefly population in the search space. Under the same conditions, particles generated by Chebyshev mapping can collect more information, effectively avoiding the problem of particle swarm falling into local optimal. Compared with the commonly used chaotic mapping logistic mapping, Chebyshev mapping has more advantages in distribution range and distribution mode.In this paper, the Chebyshev mapping method is adopted to generate chaotic variables, and the formula is shown as follows:(9)xn+1=coskarc cosxn,xn∈−1,1.Here,k is the order and can generate an unrelated chaotic sequence with ergodic property. The steps for Chebyshev to map the population number of fireflies are as follows:(A)
Define the population numberN of firefly and randomly generate a D-dimensional vector as the first firefly individual in the D-dimensional space, Y=y1,y2,..,,yDvi∈−1,1,i∈1,d;(B)
N-1 iterations were performed for each dimension of Y using formula (9) to generate the remaining N-1 firefly individuals;(C)
The mapping formula is shown in formula (10), which maps the generated N firefly individuals to the solution search space in turn:(10)xid=ld+1+yid×ud－ld2.Here,ud and ld are the upper and lower bounds of the d-th dimension of the search space, respectively; yid is the d-th dimension of the i-th firefly; and xid is the coordinate value of the d-th dimension of the i-th firefly in the search space.


#### 3.3.2. Adaptive Step Factor

The optimization ability of firefly population is mainly reflected in the individual position updating method. In formula (7), the first term represents the current location of fireflies; the second item indicates the global search ability of fireflies; the third item represents the local search ability of fireflies, in which the adjustment of step factor is very critical.Parameterα in FA algorithm balances the ability of firefly population exploration and development, and the value range of α is [0, 1]. Too large or too small random value may seriously affect the search ability of the population. Therefore, an adaptive step mechanism is designed to enable the population to independently and timely change the global search and local search in the search process, so as to improve the ability to find the optimal solution. The calculation formula of the control parameter α is shown as the following formula:(11)αt+1=αtδ,0.5<δ<1.Here,δ represents the cooling coefficient. At the early stage of iteration, a larger value is given to the step factor α to ensure a better global optimization capability in the early stage. After that, the α value decreases gradually in the iterative process, ensuring better local search capability. By adjusting the α value, the global search ability and local search ability of firefly algorithm can be better balanced.


#### 3.3.3. Gaussian Disturbance Mechanism

When FA algorithm falls into the local optimal state, its own random disturbance strategy cannot jump out of the local optimal position under multidimensional conditions, so a more adaptable disturbance mechanism is needed. Gaussian perturbation is a commonly used perturbation strategy for local optimal problems. It carries out Gaussian perturbation on the optimal individual obtained after each iteration to obtain a new optimal individual until the Gaussian perturbation cannot be obtained.The new optimal individual indicates that the algorithm has reached the global optimal.The basic principle of Gaussian perturbation is to add a small amplitude random vector to the position vector of the optimal individual in each iteration process, and this vector should conform to the normal distribution. The formula is as follows:(12)Yit+1=Yit×1+N0,1.Here,Yit represents the current position of the i-th firefly; Yit+1 represents the new position formed by Gaussian disturbance; and N(0, 1) is a random vector and obeys normal distribution.In each iteration of the algorithm, Gbest corresponds to the contemporary optimal position and is subjected to Gaussian perturbation. The formula is as follows:(13)NGbest=Gbest1+N0,1.Vector NGbest represents the new position vector formed after Gaussian disturbance, and then the global optimal position is updated. The update formula is shown as the following formula:(14)Gbestt+1=NGbestt,ifNGbestt<GbesttGbestt,otherwise.To sum up, the steps of the improved firefly algorithm are shown in Figure4.Figure 4
Flow chart of improved firefly algorithm.


## 3.1. FCM Algorithm

FCM is a common clustering algorithm that distributes sample data according to their membership degree. Its objective function formula is shown in the following formula:(1)JFCMU,V=∑i=1c∑j=1nui,jmdij2.Here,n represents the total number of samples, and its sample dataset X=x1,x2,…,xn, xj=xj1,xj2,…,xjs represents s attributes of the j-th sample; C represents the number of cluster centroid, V=v1,v2,…,vc represents the centroid set; element ui,j represents the size of the j-th sample belonging to the center of mass I, and m represents the fuzzy index, usually taking a constant value of 2; and dij is the Euclidean distance from each sample to the cluster center. The membership matrix uij and the centroid matrix vi are calculated as shown in the following equations:(2)uij=1∑k=1Cdij/dkj2/m−1,(3)vi=∑j=1nuijmxj∑j=1nuijm.


## 3.2. FA Algorithm

As a swarm intelligence optimization algorithm, FA has more advantages than particle swarm optimization and genetic algorithm in global optimization [17–19]. The algorithm searches and optimizes fixed space by simulating the process of attraction and movement between fireflies in nature. The firefly makes the darker individuals move to the brighter ones through its own fluorescein luminescence, and finally all the individuals tend to the brightest firefly, and its position is the optimal position in the search space. The luminance, attractiveness, and position update formulas for fireflies are described by the following definitions.Definition 1.
The relative fluorescence of two fireflies is shown in the following formula:(4)I=I0e−γijr.
Here,I0 represents the highest fluorescence brightness obtained when γ=0, and the better the objective function value is, the higher the brightness will be; γ represents the absorption coefficient of light intensity as the distance between the two fireflies increases, indicating that the fluorescence is gradually weakened by the air medium; and rij represents the distance between firefly i and firefly j. The calculation formula is shown as formula (5), and s represents the dimension:(5)rij=xi－xj=∑l=1xxil－xjl2.Definition 2.
The attraction degree of fireflies is shown in the following formula:(6)β=β0e−γrij2.
Here,β0 represents the maximum attraction, that is, the attraction when r = 0, γ is the same as above.Definition 3.
The firefly position update formula is shown as the following formula:(7)sit+1=sit+βsjt−sit+αrand−0.5.
Here,si and sj are the positions of firefly i and j in the search space, respectively; t represents the number of iterations; β is the attractiveness; α is the step factor, its value range is in the interval [0, 1], where the value is a constant; and rand is the random factor, which is the random number on the interval [0, 1].


## 3.3. Improved Firefly Algorithm

### 3.3.1. Chebyshev Maps

In order to verify the effectiveness of Chebyshev chaotic mapping, the Chebyshev chaotic mapping method was used to evenly distribute 20 two-dimensional particles into the three-dimensional plane formed by functionz (as shown in Figure 2) and compared with the three-dimensional graph of traditional randomly distributed particle swarm optimization (as shown in Figure 3). The expression of function z is shown in the following formula:(8)z=31−x2e−y2−x+12.Figure 2
Chebyshev chaotic map distribution.Figure 3
Traditional random distribution.By comparing Figure2 with Figure 3, it can be seen that Chebyshev mapping method can evenly distribute the initial firefly population in the search space. Under the same conditions, particles generated by Chebyshev mapping can collect more information, effectively avoiding the problem of particle swarm falling into local optimal. Compared with the commonly used chaotic mapping logistic mapping, Chebyshev mapping has more advantages in distribution range and distribution mode.In this paper, the Chebyshev mapping method is adopted to generate chaotic variables, and the formula is shown as follows:(9)xn+1=coskarc cosxn,xn∈−1,1.Here,k is the order and can generate an unrelated chaotic sequence with ergodic property. The steps for Chebyshev to map the population number of fireflies are as follows:(A)
Define the population numberN of firefly and randomly generate a D-dimensional vector as the first firefly individual in the D-dimensional space, Y=y1,y2,..,,yDvi∈−1,1,i∈1,d;(B)
N-1 iterations were performed for each dimension of Y using formula (9) to generate the remaining N-1 firefly individuals;(C)
The mapping formula is shown in formula (10), which maps the generated N firefly individuals to the solution search space in turn:(10)xid=ld+1+yid×ud－ld2.Here,ud and ld are the upper and lower bounds of the d-th dimension of the search space, respectively; yid is the d-th dimension of the i-th firefly; and xid is the coordinate value of the d-th dimension of the i-th firefly in the search space.


### 3.3.2. Adaptive Step Factor

The optimization ability of firefly population is mainly reflected in the individual position updating method. In formula (7), the first term represents the current location of fireflies; the second item indicates the global search ability of fireflies; the third item represents the local search ability of fireflies, in which the adjustment of step factor is very critical.Parameterα in FA algorithm balances the ability of firefly population exploration and development, and the value range of α is [0, 1]. Too large or too small random value may seriously affect the search ability of the population. Therefore, an adaptive step mechanism is designed to enable the population to independently and timely change the global search and local search in the search process, so as to improve the ability to find the optimal solution. The calculation formula of the control parameter α is shown as the following formula:(11)αt+1=αtδ,0.5<δ<1.Here,δ represents the cooling coefficient. At the early stage of iteration, a larger value is given to the step factor α to ensure a better global optimization capability in the early stage. After that, the α value decreases gradually in the iterative process, ensuring better local search capability. By adjusting the α value, the global search ability and local search ability of firefly algorithm can be better balanced.


### 3.3.3. Gaussian Disturbance Mechanism

When FA algorithm falls into the local optimal state, its own random disturbance strategy cannot jump out of the local optimal position under multidimensional conditions, so a more adaptable disturbance mechanism is needed. Gaussian perturbation is a commonly used perturbation strategy for local optimal problems. It carries out Gaussian perturbation on the optimal individual obtained after each iteration to obtain a new optimal individual until the Gaussian perturbation cannot be obtained.The new optimal individual indicates that the algorithm has reached the global optimal.The basic principle of Gaussian perturbation is to add a small amplitude random vector to the position vector of the optimal individual in each iteration process, and this vector should conform to the normal distribution. The formula is as follows:(12)Yit+1=Yit×1+N0,1.Here,Yit represents the current position of the i-th firefly; Yit+1 represents the new position formed by Gaussian disturbance; and N(0, 1) is a random vector and obeys normal distribution.In each iteration of the algorithm, Gbest corresponds to the contemporary optimal position and is subjected to Gaussian perturbation. The formula is as follows:(13)NGbest=Gbest1+N0,1.Vector NGbest represents the new position vector formed after Gaussian disturbance, and then the global optimal position is updated. The update formula is shown as the following formula:(14)Gbestt+1=NGbestt,ifNGbestt<GbesttGbestt,otherwise.To sum up, the steps of the improved firefly algorithm are shown in Figure4.Figure 4
Flow chart of improved firefly algorithm.


## 3.3.1. Chebyshev Maps

In order to verify the effectiveness of Chebyshev chaotic mapping, the Chebyshev chaotic mapping method was used to evenly distribute 20 two-dimensional particles into the three-dimensional plane formed by functionz (as shown in Figure 2) and compared with the three-dimensional graph of traditional randomly distributed particle swarm optimization (as shown in Figure 3). The expression of function z is shown in the following formula:(8)z=31−x2e−y2−x+12.Figure 2
Chebyshev chaotic map distribution.Figure 3
Traditional random distribution.By comparing Figure2 with Figure 3, it can be seen that Chebyshev mapping method can evenly distribute the initial firefly population in the search space. Under the same conditions, particles generated by Chebyshev mapping can collect more information, effectively avoiding the problem of particle swarm falling into local optimal. Compared with the commonly used chaotic mapping logistic mapping, Chebyshev mapping has more advantages in distribution range and distribution mode.In this paper, the Chebyshev mapping method is adopted to generate chaotic variables, and the formula is shown as follows:(9)xn+1=coskarc cosxn,xn∈−1,1.Here,k is the order and can generate an unrelated chaotic sequence with ergodic property. The steps for Chebyshev to map the population number of fireflies are as follows:(A)
Define the population numberN of firefly and randomly generate a D-dimensional vector as the first firefly individual in the D-dimensional space, Y=y1,y2,..,,yDvi∈−1,1,i∈1,d;(B)
N-1 iterations were performed for each dimension of Y using formula (9) to generate the remaining N-1 firefly individuals;(C)
The mapping formula is shown in formula (10), which maps the generated N firefly individuals to the solution search space in turn:(10)xid=ld+1+yid×ud－ld2.Here,ud and ld are the upper and lower bounds of the d-th dimension of the search space, respectively; yid is the d-th dimension of the i-th firefly; and xid is the coordinate value of the d-th dimension of the i-th firefly in the search space.


## 3.3.2. Adaptive Step Factor

The optimization ability of firefly population is mainly reflected in the individual position updating method. In formula (7), the first term represents the current location of fireflies; the second item indicates the global search ability of fireflies; the third item represents the local search ability of fireflies, in which the adjustment of step factor is very critical.Parameterα in FA algorithm balances the ability of firefly population exploration and development, and the value range of α is [0, 1]. Too large or too small random value may seriously affect the search ability of the population. Therefore, an adaptive step mechanism is designed to enable the population to independently and timely change the global search and local search in the search process, so as to improve the ability to find the optimal solution. The calculation formula of the control parameter α is shown as the following formula:(11)αt+1=αtδ,0.5<δ<1.Here,δ represents the cooling coefficient. At the early stage of iteration, a larger value is given to the step factor α to ensure a better global optimization capability in the early stage. After that, the α value decreases gradually in the iterative process, ensuring better local search capability. By adjusting the α value, the global search ability and local search ability of firefly algorithm can be better balanced.


## 3.3.3. Gaussian Disturbance Mechanism

When FA algorithm falls into the local optimal state, its own random disturbance strategy cannot jump out of the local optimal position under multidimensional conditions, so a more adaptable disturbance mechanism is needed. Gaussian perturbation is a commonly used perturbation strategy for local optimal problems. It carries out Gaussian perturbation on the optimal individual obtained after each iteration to obtain a new optimal individual until the Gaussian perturbation cannot be obtained.The new optimal individual indicates that the algorithm has reached the global optimal.The basic principle of Gaussian perturbation is to add a small amplitude random vector to the position vector of the optimal individual in each iteration process, and this vector should conform to the normal distribution. The formula is as follows:(12)Yit+1=Yit×1+N0,1.Here,Yit represents the current position of the i-th firefly; Yit+1 represents the new position formed by Gaussian disturbance; and N(0, 1) is a random vector and obeys normal distribution.In each iteration of the algorithm, Gbest corresponds to the contemporary optimal position and is subjected to Gaussian perturbation. The formula is as follows:(13)NGbest=Gbest1+N0,1.Vector NGbest represents the new position vector formed after Gaussian disturbance, and then the global optimal position is updated. The update formula is shown as the following formula:(14)Gbestt+1=NGbestt,ifNGbestt<GbesttGbestt,otherwise.To sum up, the steps of the improved firefly algorithm are shown in Figure4.Figure 4
Flow chart of improved firefly algorithm.


## 4. Experimental Results and Analysis

### 4.1. Experimental Operation Platform

The program running environment of this experiment is processor CPU Intel Core I7-8750H, main frequency 2.20 GHz six-core, memory 8 GB, operating system Windows 10 64 bit, and integrated development environment for MATLAB 2014A.


### 4.2. Experimental Dataset

During the experiment, four datasets commonly used in UCI database 1 were adopted: Iris dataset, Ecoli dataset, Wine dataset, and Glass dataset; the detailed information of each dataset is shown in Table1. In addition, in the process of clustering, in order to avoid the influence of the clustering results caused by the great difference between the characteristic values, the dataset values are normalized so that the characteristic values are between [0, 1].Table 1
Datasets used in the experiment (number of people).
DatasetsNumber of samplesNumber of attributesNumber of categoriesIris15043Ecoli33678Wine178133Glass214107


### 4.3. Evaluation Indicators

In this experiment, clustering accuracy (ACC) and normalized mutual information (NMI) were used to evaluate clustering performance. Clustering accuracy: the ratio of the number of samples correctly assigned to clustering to the total number of samples requiring clustering. The calculation formula is as follows:(15)ACC=∑k=1KdkN.Here, DK represents the number of samples correctly assigned to the Kth cluster, andN represents the number of all samples.Standardized mutual information: a symmetric metric that quantifies statistical information shared between two cluster distributions. The measurement formula is as follows:(16)NMIR,Q=∑i=1I∑j=1JPi,jlogPi,j/PiPjHRHQ.Here,R and Q are the two partitions of the input dataset, including cluster i and cluster j; P(I), respectively, is the probability of being assigned to cluster Ri from randomly selected samples in the dataset; P(i, j) is the probability of the sample belonging to cluster Ri and cluster Qi at the same time; and H(R) is the entropy associated with all the probabilities P(I) (1 ≤ i ≤ I) in partition R. The higher the accuracy value in the experimental results, the more the sample is correctly allocated to the corresponding cluster, and the better the clustering performance. The larger the value of standardized mutual information is, the more accurate the partition between clusters is, and the better the clustering effect of the algorithm is.


### 4.4. Experimental Result

The proposed algorithm was used to run 30 particles in three test functions for 20 times, each round of iteration was 500 times, and its average value and standard deviation were calculated and then compared with the other five algorithms: FA [14], FAGO [14], FABE [14], PSO [19], and GA [19]. The comparison results are shown in Table 2. It is proved that the algorithm has good competitiveness in finding the most value point among the six kinds of algorithm precision single-peak function or multi-peak function, and it can solve the problem of FCM algorithm falling into the local center of the initial cluster center to a certain extent. It can provide a solid basis for the results of the improved fuzzy clustering algorithm. Comparison of the results of six algorithms under three test functions is shown in Table 2.Table 2
Comparison of the results of six algorithms under three test functions.
FunctionFA [14]FAGO [14]FABE [14]PSO [19]GA [19]IFAF1AVG2.00E − 031.74E − 044.51E − 041.83E + 041.03E + 031.21E − 08STD7.03E − 051.35E − 059.24E − 063.01E + 035.79E + 025.43E − 08F2AVG1.198E + 021.97E + 015.28E + 001.96E + 071.94E + 042.59E − 01STD3.83E + 012.90E + 011.62E + 016.25E + 061.31E + 043.97E − 01F3AVG2.60E − 012.37E − 041.07E − 051.70E + 021.01E + 011.67E − 11STD3.57E − 046.23E − 091.36E − 083.17E + 012.43E + 007.43E − 11It can be seen from Table2 that the simulation results of the cluster analysis algorithm have better simulation results than other models, and the accuracy is higher, and it has better trend analysis for the researched problems.


#### 4.4.1. Comparison Experiment of Clustering Performance

The algorithms FCM, PSOFCM, FAFCM, and IFAFCM were compared on four datasets. The parameters of the algorithm were set as the maximum iteration number maxT = 300, fuzzy indexm = 2, threshold ε = 10–5, initial population N = 30, maximum attraction β0 = 1.0, step factor α = 0.8, cooling coefficient δ = 0.98, light absorption factor γ = 0.9, and particle acceleration coefficient C1 = c2 = 2; r1 and R2 are random numbers distributed in [0, 1]; inertia weight coefficient Wmax = 0.9, and Wmin = 0.4.Each algorithm was run on each dataset for 10 times, and ACC and NMI were obtained by the average value. The comparison results are shown in Table3.Table 3
Comparison of the results of evaluation indexes ACC and NMI of the four algorithms, %.
AlgorithmIrisEcoliWineGlassACCNMIACCNMIACCNMIACCNMIFCM89.3374.0452.3848.2994.3882.9938.7930.41PSOFCM90.6775.9254.3649.6594.7183.2442.1933.66FAFCM91.1378.8458.9351.7795.5184.7344.9936.44IFAFCM93.1284.6262.9356.7196.3587.4649.6345.21


## 4.1. Experimental Operation Platform

The program running environment of this experiment is processor CPU Intel Core I7-8750H, main frequency 2.20 GHz six-core, memory 8 GB, operating system Windows 10 64 bit, and integrated development environment for MATLAB 2014A.


## 4.2. Experimental Dataset

During the experiment, four datasets commonly used in UCI database 1 were adopted: Iris dataset, Ecoli dataset, Wine dataset, and Glass dataset; the detailed information of each dataset is shown in Table1. In addition, in the process of clustering, in order to avoid the influence of the clustering results caused by the great difference between the characteristic values, the dataset values are normalized so that the characteristic values are between [0, 1].Table 1
Datasets used in the experiment (number of people).
DatasetsNumber of samplesNumber of attributesNumber of categoriesIris15043Ecoli33678Wine178133Glass214107


## 4.3. Evaluation Indicators

In this experiment, clustering accuracy (ACC) and normalized mutual information (NMI) were used to evaluate clustering performance. Clustering accuracy: the ratio of the number of samples correctly assigned to clustering to the total number of samples requiring clustering. The calculation formula is as follows:(15)ACC=∑k=1KdkN.Here, DK represents the number of samples correctly assigned to the Kth cluster, andN represents the number of all samples.Standardized mutual information: a symmetric metric that quantifies statistical information shared between two cluster distributions. The measurement formula is as follows:(16)NMIR,Q=∑i=1I∑j=1JPi,jlogPi,j/PiPjHRHQ.Here,R and Q are the two partitions of the input dataset, including cluster i and cluster j; P(I), respectively, is the probability of being assigned to cluster Ri from randomly selected samples in the dataset; P(i, j) is the probability of the sample belonging to cluster Ri and cluster Qi at the same time; and H(R) is the entropy associated with all the probabilities P(I) (1 ≤ i ≤ I) in partition R. The higher the accuracy value in the experimental results, the more the sample is correctly allocated to the corresponding cluster, and the better the clustering performance. The larger the value of standardized mutual information is, the more accurate the partition between clusters is, and the better the clustering effect of the algorithm is.


## 4.4. Experimental Result

The proposed algorithm was used to run 30 particles in three test functions for 20 times, each round of iteration was 500 times, and its average value and standard deviation were calculated and then compared with the other five algorithms: FA [14], FAGO [14], FABE [14], PSO [19], and GA [19]. The comparison results are shown in Table 2. It is proved that the algorithm has good competitiveness in finding the most value point among the six kinds of algorithm precision single-peak function or multi-peak function, and it can solve the problem of FCM algorithm falling into the local center of the initial cluster center to a certain extent. It can provide a solid basis for the results of the improved fuzzy clustering algorithm. Comparison of the results of six algorithms under three test functions is shown in Table 2.Table 2
Comparison of the results of six algorithms under three test functions.
FunctionFA [14]FAGO [14]FABE [14]PSO [19]GA [19]IFAF1AVG2.00E − 031.74E − 044.51E − 041.83E + 041.03E + 031.21E − 08STD7.03E − 051.35E − 059.24E − 063.01E + 035.79E + 025.43E − 08F2AVG1.198E + 021.97E + 015.28E + 001.96E + 071.94E + 042.59E − 01STD3.83E + 012.90E + 011.62E + 016.25E + 061.31E + 043.97E − 01F3AVG2.60E − 012.37E − 041.07E − 051.70E + 021.01E + 011.67E − 11STD3.57E − 046.23E − 091.36E − 083.17E + 012.43E + 007.43E − 11It can be seen from Table2 that the simulation results of the cluster analysis algorithm have better simulation results than other models, and the accuracy is higher, and it has better trend analysis for the researched problems.


### 4.4.1. Comparison Experiment of Clustering Performance

The algorithms FCM, PSOFCM, FAFCM, and IFAFCM were compared on four datasets. The parameters of the algorithm were set as the maximum iteration number maxT = 300, fuzzy indexm = 2, threshold ε = 10–5, initial population N = 30, maximum attraction β0 = 1.0, step factor α = 0.8, cooling coefficient δ = 0.98, light absorption factor γ = 0.9, and particle acceleration coefficient C1 = c2 = 2; r1 and R2 are random numbers distributed in [0, 1]; inertia weight coefficient Wmax = 0.9, and Wmin = 0.4.Each algorithm was run on each dataset for 10 times, and ACC and NMI were obtained by the average value. The comparison results are shown in Table3.Table 3
Comparison of the results of evaluation indexes ACC and NMI of the four algorithms, %.
AlgorithmIrisEcoliWineGlassACCNMIACCNMIACCNMIACCNMIFCM89.3374.0452.3848.2994.3882.9938.7930.41PSOFCM90.6775.9254.3649.6594.7183.2442.1933.66FAFCM91.1378.8458.9351.7795.5184.7344.9936.44IFAFCM93.1284.6262.9356.7196.3587.4649.6345.21


## 4.4.1. Comparison Experiment of Clustering Performance

The algorithms FCM, PSOFCM, FAFCM, and IFAFCM were compared on four datasets. The parameters of the algorithm were set as the maximum iteration number maxT = 300, fuzzy indexm = 2, threshold ε = 10–5, initial population N = 30, maximum attraction β0 = 1.0, step factor α = 0.8, cooling coefficient δ = 0.98, light absorption factor γ = 0.9, and particle acceleration coefficient C1 = c2 = 2; r1 and R2 are random numbers distributed in [0, 1]; inertia weight coefficient Wmax = 0.9, and Wmin = 0.4.Each algorithm was run on each dataset for 10 times, and ACC and NMI were obtained by the average value. The comparison results are shown in Table3.Table 3
Comparison of the results of evaluation indexes ACC and NMI of the four algorithms, %.
AlgorithmIrisEcoliWineGlassACCNMIACCNMIACCNMIACCNMIFCM89.3374.0452.3848.2994.3882.9938.7930.41PSOFCM90.6775.9254.3649.6594.7183.2442.1933.66FAFCM91.1378.8458.9351.7795.5184.7344.9936.44IFAFCM93.1284.6262.9356.7196.3587.4649.6345.21


## 5. Conclusion

This paper proposes an improved fuzzy clustering algorithm IFAFCM to improve the initialization sensitivity and poor robustness of traditional FCM, thereby improving the clustering accuracy. First, the Chebyshev chaotic map is used to evenly distribute the firefly population in the search space to generate an initial population with a wide range, uniform distribution, and strong global search ability. Then, the step factor is transformed into a dynamic adjustment mode to balance the exploration and development process. Finally, Gaussian disturbance is used to mutate the optimal individual to enhance the ability of the algorithm to jump out of the local optimum. The combination of the firefly algorithm and the traditional FCM algorithm not only provides a good global search capability but also ensures a good local development capability. In order to evaluate the clustering effect of the IFAFCM algorithm, experiments were conducted on four datasets and compared with the other three algorithms. The experimental results show that compared with the other three algorithms, the IFAFCM algorithm has improved clustering performance and antinoise ability. In future research, as the factors affecting the mental health of college students are becoming more and more complex, it is necessary to develop more parameters for analysis, which is an important topic for future research.



---

*Source: 3960559-2021-09-03.xml*