# Research on the Use of Neural Network for the Prediction of College Students’ Mental Health

Authors: Haoyue Liu; Jilin Xu
Journal: Scientific Programming
 (2022)

---

## Abstract

A healthy mental status of students plays an important role in getting quality of education. Hence, research on the prediction of college students’ mental health status is of great importance and considered as a hot area of research. In this specific research study, back propagation (BP) algorithm is adopted to learn verities of characteristics of different students from the historical data of the students including: psychological characteristics, basic personal characteristics, and socio-economic characteristics. In the initial stage of the modeling, data preprocessing steps are used to prepare the data to be used by the BP algorithm for building model. The rationales behind the use of BP algorithm are its capability of handling heterogeneity of data and exploring correlations among different characteristics. The proposed model enhances the capability of BP algorithm for risk prediction of psychological problem of the students and achieves higher precision of psychological problem prediction. The results obtained show that the error between the predicted and measured values is 0.88%.


---

## Body

## 1. Introduction

Education departments at all levels in China attach great importance to the psychological early warning work of college students; however, there is a general lack of awareness of the application of information technology in the actual work, which increases the passivity of the work. In addition, the mental health level of college students is influenced by many internal and external factors, and there are complex correlations among the factors, which is a nonlinear problem [1].In recent years, with the arrival of big data era and cloud computing, deep learning has made a great breakthrough in practical application, which not only has a deeper network structure and is a kind of intelligent machine learning, but also enables computers to learn laws from massive historical data through a series of algorithms, establish analytical models, realize the whole process from feature extraction to feature classification end-to-end, and perform intelligent recognition of new samples or make predictions for the future [2, 3]. To perform intelligent recognition or make predictions for the future,many scholars propose that we use the machine learning and other algorithms to analyze the influencing factors that affect students’ psychological problems, and through machine algorithms or building analytical models, the original data start with each layer of representation (or features) through continuous training and gradually converts them into higher-level representations to obtain the maximum data value for classification and prediction, so as to achieve the purpose of psychological problem prediction [4, 5].As a special group carrying high expectations from society and parents, college students face significantly higher psychological pressure than other groups of their age, so it is important to study the psychological status of contemporary college students. Various aspects of psychological health are specifically expressed, including physical, intellectual, and emotional harmony; adapting to the environment and being humble to each other in interpersonal relationships; having a sense of well-being; and being able to give full play to their abilities and lead an efficient life in work and occupation [6, 7]. It has a positive impact to explore the inner laws of various factors affecting mental health in order to cope with future mental health stress and provide new ideas for mental health work.We seek to find out what can be explored in the irregularity of factors affecting mental health. If we use methods such as time series analysis and nonlinear systems analysis to predict, there are great difficulties and uncertainties in theoretical research and practical application [8, 9]. The BP network is a network containing an implicit layer, and its algorithm consists of forward and backward propagation. If the output layer does not get the desired output result, it then enters the error back propagation stage, and the network modifies the weights of each layer according to the back-propagation error signal to minimize the error signal, which is also the most widely used in practical applications.Therefore, the statistical values of the factors affecting mental health in the six years from 2003 to 2008 were used as the sample to predict the weight values of the factors affecting mental health in 2010. The factors affecting college students’ mental health were divided into nine categories, namely, high pressure on personal future, unsatisfactory results in college entrance exams, personal emotional frustration, conflict with classmates, high parental expectations, family financial difficulties, poor parental relationship, low professional interest, and other factors, among which high pressure on personal future and personal emotional frustration had the largest weights [10].In summary, shortcomings of the existing studies, in respect of prediction of students mental health, include: issues in identifications of most influential characteristics of the students, and lack of mechanism for finding relationship between the characteristics and efficient modeling.The key contributions of the study include the following:(i)
Identification of different types of influential characteristics of different types of students from their historical data, such as psychological characteristics, basic personal characteristics, and socio-economic characteristics.(ii)
Efficient data preprocessing for effective BP modeling.(iii)
Effective handling of heterogeneity of data and exploring correlations among different characteristics.(iv)
Design and development of efficient back propagation prediction model for predicting risk of psychological problem in college students.


## 2. Methodology

In this study, the main factors affecting the psychological problems of college students are taken as sample input, and the data are mainly reflected in the SCL-90 scale by adding factors such as basic personal information and social support, using BP neural network to establish a prediction model of psychological problems, and learning training for the input test sample through the mapping relationship between each influencing factor and psychological problems, as long as the data of influencing factors are continuously input to complete the training analysis. The prediction model is made closer to the actual characteristics of the survey sample to achieve the purpose of psychological problem prediction [11].Roadmap of the proposed research includes the key steps of data collection from various data sources, data preprocessing to remove inconsistencies, identifications of key characteristics for building the prediction model, training the proposed back propagation algorithm and learning hidden patterns form the historical data of the targeted students, testing the learned model with by using test dataset and some real-world examples to know the models predictive accuracy, and finally evaluating the model by comparing its results with the results of the state-of-the-art models, which is shown in Figure1.Figure 1
Research roadmap.


## 3. Data Acquisition and PreProcessing

The data used in this study were derived from the psychological census data of new students, basic student profile forms, and social support questionnaire statistics for the past 5 years from three representative university colleges and universities, Hunan Institute of Technology, Hunan Institute of Science and Technology, and Hunan Engineering Vocational Technology, with a total of 1036 students’ historical data. In the data collection process, the psychological census data mainly refer to the 90-item symptom inventory (SCL-90 scale), which uses a five-level scale to reflect the mental health status (F1–F10) from 10-factor scores with a specific reference range of normal values; the basic student profile form is based on the fact that students in university colleges and universities have the same basic attribute characteristics: such as age, education level, education experience, etc., but also have different attribute characteristics, such as gender, major, place of birth, family status, etc. In this study, five categories of data [12], namely gender, age, major, place of birth, and family economic income, are mainly referred to; in the external influencing factors, two categories of data, namely satisfaction with material support and satisfaction with mental support, are mainly referred to.


### 3.1. Data Feature Extraction

In this study, based on various attribute characteristic factors related to psychological problems affecting students in colleges and universities, the adjusted results were adjusted by weighting these factors to more accurately reflect the mental health of students in university colleges and universities [13, 14]. It is divided into: firstly, collecting a large amount of small data of three categories of internal and external factors affecting psychological problems, such as basic personal situation, social support situation, etc.; secondly, classifying them according to performance characteristics, grading them according to the size of their influence, and developing the range values of weighted influence scores of each characteristic score, as well as progressive and decreasing rules. For example, there are 10 factors in the Symptoms Checklist-90 (SCL-90) scale [15], each factor contains different items, and the data are processed for factor averaging, and the results are shown in Table 1. SCL-90 is a method to evaluate psychological problems and identify symptoms, which is used in psychiatry, mental health, and educational fields for monitoring the patient’s progress or treatment outcomes.Table 1
Partial results of SCL-90 data processing.
F1F2F3F4F5F6F7F8F9Other1.452.111.911.872.091.232.231.092.092.151.791.232.341.121.861.831.962.102.111.342.011.891.561.671.342.131.651.671.231.661.322.561.232.091.031.441.231.231.781.761.681.092.341.022.781.611.671.561.222.312.212.451.571.891.562.012.221.201.411.211.231.561.232.621.451.891.231.842.011.77


### 3.2. Data Normalization Process

When the sample data are trained for network, the sample data present fragmentation, diversity, and single dimension, etc. The large amount of small data that exists must be normalized to conform to the large data characteristics of traceability, quantifiability, comparability, analysis, and high dimensionality, and mapped to the [−1, 1] interval for easier processing. The network input and output matrices are set as shown in Table2.Table 2
Network input and output matrix.
FunctionRun settingsNotessr, ps = mapminmax (r rmin rmax)r is the normalized input matrixMapminmaxsc, ps = mapminmax (c rmin cmax)c is the normalized output matrixThen the network input and output data are restricted to the interval of [0, 1] or [−1, 1] with the following formula:(1)X¯i=Xi−XminXmax−Xmin.Xi indicates the input or output data, Xmin indicates the minimum value in the data, and Xmax indicates the maximum value. The input and output data are set at [−1, 1], when the original data of the middle value are converted to 0, the maximum value and the minimum value are 1 and −1, and the formula is as follows:(2)Xmid=Xmax+Xmin2,X¯i=Xi−Xmid1/2Xmax−Xmin.


## 3.1. Data Feature Extraction

In this study, based on various attribute characteristic factors related to psychological problems affecting students in colleges and universities, the adjusted results were adjusted by weighting these factors to more accurately reflect the mental health of students in university colleges and universities [13, 14]. It is divided into: firstly, collecting a large amount of small data of three categories of internal and external factors affecting psychological problems, such as basic personal situation, social support situation, etc.; secondly, classifying them according to performance characteristics, grading them according to the size of their influence, and developing the range values of weighted influence scores of each characteristic score, as well as progressive and decreasing rules. For example, there are 10 factors in the Symptoms Checklist-90 (SCL-90) scale [15], each factor contains different items, and the data are processed for factor averaging, and the results are shown in Table 1. SCL-90 is a method to evaluate psychological problems and identify symptoms, which is used in psychiatry, mental health, and educational fields for monitoring the patient’s progress or treatment outcomes.Table 1
Partial results of SCL-90 data processing.
F1F2F3F4F5F6F7F8F9Other1.452.111.911.872.091.232.231.092.092.151.791.232.341.121.861.831.962.102.111.342.011.891.561.671.342.131.651.671.231.661.322.561.232.091.031.441.231.231.781.761.681.092.341.022.781.611.671.561.222.312.212.451.571.891.562.012.221.201.411.211.231.561.232.621.451.891.231.842.011.77


## 3.2. Data Normalization Process

When the sample data are trained for network, the sample data present fragmentation, diversity, and single dimension, etc. The large amount of small data that exists must be normalized to conform to the large data characteristics of traceability, quantifiability, comparability, analysis, and high dimensionality, and mapped to the [−1, 1] interval for easier processing. The network input and output matrices are set as shown in Table2.Table 2
Network input and output matrix.
FunctionRun settingsNotessr, ps = mapminmax (r rmin rmax)r is the normalized input matrixMapminmaxsc, ps = mapminmax (c rmin cmax)c is the normalized output matrixThen the network input and output data are restricted to the interval of [0, 1] or [−1, 1] with the following formula:(1)X¯i=Xi−XminXmax−Xmin.Xi indicates the input or output data, Xmin indicates the minimum value in the data, and Xmax indicates the maximum value. The input and output data are set at [−1, 1], when the original data of the middle value are converted to 0, the maximum value and the minimum value are 1 and −1, and the formula is as follows:(2)Xmid=Xmax+Xmin2,X¯i=Xi−Xmid1/2Xmax−Xmin.


## 4. Building a BP Network Prediction Model

Taking the construction of the BP neural network model as a tool, we optimize the BP algorithm according to the internal and external factors affecting college students’ psychological problems and simulate and train the model to achieve the purpose of optimization [16]. BP learning network model refers to the design of the neural network structure in the prediction model, this study will affect the students’ mental health problems structured data (training sample data) as input nodes, from the perspective of psychological prediction set filtering conditions, i.e., the number of layers (hidden layer) and number of nodes model structure is set in the middle, and the output node is the preliminary expected value of psychological problem prediction.


### 4.1. Determination of the Number of Neurons in the Input Layer

In the selection of the number of neurons in the input layer of the BP network, the variables that express the overall characteristics of the sample must meet the selected input variables that do not have a strong linear relationship with each other and that have a strong impact on the output and can be detected.Combining the foundation of the previous study, the characteristic layers of the predictors of psychological problems of college students were analyzed from the internal and external perspectives, including three, namely, psychological self-assessment, basic personal situation, and social support. The number of 17 neurons was determined synthetically and is shown in Table3.Table 3
The list of the synthetically determined neurons.
NeuronDescriptionScaleA1Gender (xb)A2Age (nl)A3Major (zy)A4Place of birth (syd)A5Family economic income (jtsr)B1Degree of material support (wzzc)B2Degree of spiritual support (jszc)C1Somatization factor (qth)1, 4, 12, 27, 40, 42, 48, 49, 52, 53, 56, 58C2Obsessive-compulsive factor (qp)3, 9, 10, 28, 38, 45, 46C3Interpersonal sensitivity6, 21, 34, 36, 37, 41, 61, 69, 73C4Depression factor (yy)5, 14, 15, 20, 22, 26, 29, 30, 31, 32, 54, 71 79C5Anxiety factor (jl)2, 17, 23, 33, 39, 57, 72, 78, 80, 86C6Hostility factor (dd)11, 24, 63, 67, 74, 81C7Terror factor (kb)13, 25, 47, 50, 70, 75, 82C8Paranoia factor (pz)8, 18, 43, 68, 76, 83C9Psychoticism factor (jsbx)7, 16, 35, 62, 77, 84, 85, 87, 88, 90C10Other factors (qt)19, 44, 59, 60, 64, 66, 89For each of the 1 characteristic layer, we select the indicators with strong influence and association, and assign values to the indicators of the basic layer, with values from 0 to 10, and determine the coefficients of the basic layer, with values from 0 to 1.(3)Ai=∑i=13ay∂y∑i=13y.


### 4.2. Determination of the Number of Neurons in the Output Layer

The number of neurons in the output layer is determined by how the standard output is set. The output nodes represent the functional goals to be achieved by the system. In this study, the desired output of the research subject is the prediction of the risk of psychological problems of college students. Therefore, the number of neurons in the output layer was chosen to be 3 (zhengchang: equal to 1, indicating in the normal range; qingdu: equal to 1, indicating psychological confusion but within the normal range; and yanzhong equal to 1, indicating psychological abnormality.)


### 4.3. Determination of the Number of Hidden Layer Neurons

In the actual structural implementation of the number of hidden layer nodes, choosing a reasonable number of hidden layer nodes is a complex problem that relates to the accuracy of the whole network. In this study, the golden partition method is used to determine the number of hidden layer nodes, that is, the number of input layer nodes in this BP network is set toA, the number of output layer nodes to B, and the number of hidden layer nodes to L. The value range of L is [A, B], and the specific formula is as follows:(4)a=A+B2≤L≤A+B+10=b.First, we calculate 2 ≤L ≤ (A + B) + 10 = b and then calculate the formula I1  = 0.712 × (b - a) + a, I1 as the number of hidden layer nodes counted in the training model, the error after training E = (I1); the same set I2 as the number of hidden layer nodes to calculate the model, the error after training E (I2) ....... If E(I1) < E(I2), then delete (a, I2) and repeat the above steps to determine the optimal number of hidden layer nodes L in a shorter time.


## 4.1. Determination of the Number of Neurons in the Input Layer

In the selection of the number of neurons in the input layer of the BP network, the variables that express the overall characteristics of the sample must meet the selected input variables that do not have a strong linear relationship with each other and that have a strong impact on the output and can be detected.Combining the foundation of the previous study, the characteristic layers of the predictors of psychological problems of college students were analyzed from the internal and external perspectives, including three, namely, psychological self-assessment, basic personal situation, and social support. The number of 17 neurons was determined synthetically and is shown in Table3.Table 3
The list of the synthetically determined neurons.
NeuronDescriptionScaleA1Gender (xb)A2Age (nl)A3Major (zy)A4Place of birth (syd)A5Family economic income (jtsr)B1Degree of material support (wzzc)B2Degree of spiritual support (jszc)C1Somatization factor (qth)1, 4, 12, 27, 40, 42, 48, 49, 52, 53, 56, 58C2Obsessive-compulsive factor (qp)3, 9, 10, 28, 38, 45, 46C3Interpersonal sensitivity6, 21, 34, 36, 37, 41, 61, 69, 73C4Depression factor (yy)5, 14, 15, 20, 22, 26, 29, 30, 31, 32, 54, 71 79C5Anxiety factor (jl)2, 17, 23, 33, 39, 57, 72, 78, 80, 86C6Hostility factor (dd)11, 24, 63, 67, 74, 81C7Terror factor (kb)13, 25, 47, 50, 70, 75, 82C8Paranoia factor (pz)8, 18, 43, 68, 76, 83C9Psychoticism factor (jsbx)7, 16, 35, 62, 77, 84, 85, 87, 88, 90C10Other factors (qt)19, 44, 59, 60, 64, 66, 89For each of the 1 characteristic layer, we select the indicators with strong influence and association, and assign values to the indicators of the basic layer, with values from 0 to 10, and determine the coefficients of the basic layer, with values from 0 to 1.(3)Ai=∑i=13ay∂y∑i=13y.


## 4.2. Determination of the Number of Neurons in the Output Layer

The number of neurons in the output layer is determined by how the standard output is set. The output nodes represent the functional goals to be achieved by the system. In this study, the desired output of the research subject is the prediction of the risk of psychological problems of college students. Therefore, the number of neurons in the output layer was chosen to be 3 (zhengchang: equal to 1, indicating in the normal range; qingdu: equal to 1, indicating psychological confusion but within the normal range; and yanzhong equal to 1, indicating psychological abnormality.)


## 4.3. Determination of the Number of Hidden Layer Neurons

In the actual structural implementation of the number of hidden layer nodes, choosing a reasonable number of hidden layer nodes is a complex problem that relates to the accuracy of the whole network. In this study, the golden partition method is used to determine the number of hidden layer nodes, that is, the number of input layer nodes in this BP network is set toA, the number of output layer nodes to B, and the number of hidden layer nodes to L. The value range of L is [A, B], and the specific formula is as follows:(4)a=A+B2≤L≤A+B+10=b.First, we calculate 2 ≤L ≤ (A + B) + 10 = b and then calculate the formula I1  = 0.712 × (b - a) + a, I1 as the number of hidden layer nodes counted in the training model, the error after training E = (I1); the same set I2 as the number of hidden layer nodes to calculate the model, the error after training E (I2) ....... If E(I1) < E(I2), then delete (a, I2) and repeat the above steps to determine the optimal number of hidden layer nodes L in a shorter time.


## 5. Deep Network Training

BP (back propagation) algorithm is a class of guided learning algorithm, mainly used in pattern recognition, classification, function approximation, etc. The basic idea of BP algorithm is to establish a BP network to continuously adapt the network weights to correct the error function along the gradient direction down, divided into two parts: forward propagation and error back propagation. Specifically, firstly, the input sample data are passed through the input layer, and the actual output value of each unit is calculated through the implicit layer; secondly, when the actual output of the output layer is in error with the desired output value, the weights need to be continuously adjusted to carry out the learning and training process of the network, and when the error reaches the desired error, the network learning process is finished.


### 5.1. Training Parameter Setting

The input vectorX in the BP network is given as(5)X=x1,x2,x3,…,xnT|.Similarly, the hidden layer output vectorY is given as(6)Y=y1,y2,y3,…,ynT.The output layer output vector is(7)o=o1,o2,…okT,and the desired output vector d is as follows:(8)d=d1,d2,d3,…dnT.The weight matrix between the input node and the hidden layer is denoted byv and given as follows:(9)v=v1,v2,v3,…vnT.The weight matrix between the hidden layer and the output layer is denoted byW, and Wk is the weight vector corresponding to the kth neuron of the hidden layer. The learning process is specifically divided into assigning random numbers to the weights of each node in the hidden layer and the output layer—provide training set samples—set the input layer node X1, calculate the output value Y=fnet1—set the output of the hidden layer node y, the weights of the hidden layer and the output layer Wk, calculate the output value Y=fnet1—calculate the network output error—adjust the weights—take the next sample in turn, verify that the total error of the network is less than the expected error—record the weights and end the training, which is shown in Figure 2.Figure 2
BP algorithm operation process diagram.


### 5.2. Specific Training Process

The training sample data are read in, and after preprocessing such as deletion and addition to the sample data, the initial values are assigned to all the management data. The load function is selected to read the sample data as shown in Table4.Table 4
Selection of load function to read sample data.
FunctionRun settingsLoadY = lad (input’)O = load (output’)About 100 sets of data are set as training samples and 20 sets as prediction samples, all data were trained according to their progressive rules, and the results were compared with the actual values to obtain the best matching model under the above training data, which can become more accurate and realistic with the increase of the number of training specimens and the increase of the genus data in the specimen data, as shown in Table5.Table 5
Data classification.
FunctionRun settingsNotesDivdevecIxl, cs Fdivdevec (r.c. 20%)XL is the training data, CS is the prediction data, and 20% is the percentage of prediction dataWe use the network training algorithm to select the training algorithm and set the learning training network as 17 neurons, and the neural network model structure is shown in Table6.Table 6
BP network establishment settings.
FunctionRun settingsNotesNewfftrainlmnet = newff (sr, sc, 17)The hidden layer consists of 17 neuronsnet = trainlm (net, sr, sc)The network is trained using the BP algorithm and the parameters are continuously adjusted.Net.trainparam.epochs = 980;Net.trainparam.ir = 0.12;Set a training goal of 0.000000001.Thennet.trainparam.goal = 0.000000001.In this study, the neural network is established in the continuous learning training, the error is constantly reduced in the expected 900 steps, the error rate control at 3% can be completed in a relatively short period of time to fit the data, and basically the prediction of college students’ psychological problems research is achieved.


## 5.1. Training Parameter Setting

The input vectorX in the BP network is given as(5)X=x1,x2,x3,…,xnT|.Similarly, the hidden layer output vectorY is given as(6)Y=y1,y2,y3,…,ynT.The output layer output vector is(7)o=o1,o2,…okT,and the desired output vector d is as follows:(8)d=d1,d2,d3,…dnT.The weight matrix between the input node and the hidden layer is denoted byv and given as follows:(9)v=v1,v2,v3,…vnT.The weight matrix between the hidden layer and the output layer is denoted byW, and Wk is the weight vector corresponding to the kth neuron of the hidden layer. The learning process is specifically divided into assigning random numbers to the weights of each node in the hidden layer and the output layer—provide training set samples—set the input layer node X1, calculate the output value Y=fnet1—set the output of the hidden layer node y, the weights of the hidden layer and the output layer Wk, calculate the output value Y=fnet1—calculate the network output error—adjust the weights—take the next sample in turn, verify that the total error of the network is less than the expected error—record the weights and end the training, which is shown in Figure 2.Figure 2
BP algorithm operation process diagram.


## 5.2. Specific Training Process

The training sample data are read in, and after preprocessing such as deletion and addition to the sample data, the initial values are assigned to all the management data. The load function is selected to read the sample data as shown in Table4.Table 4
Selection of load function to read sample data.
FunctionRun settingsLoadY = lad (input’)O = load (output’)About 100 sets of data are set as training samples and 20 sets as prediction samples, all data were trained according to their progressive rules, and the results were compared with the actual values to obtain the best matching model under the above training data, which can become more accurate and realistic with the increase of the number of training specimens and the increase of the genus data in the specimen data, as shown in Table5.Table 5
Data classification.
FunctionRun settingsNotesDivdevecIxl, cs Fdivdevec (r.c. 20%)XL is the training data, CS is the prediction data, and 20% is the percentage of prediction dataWe use the network training algorithm to select the training algorithm and set the learning training network as 17 neurons, and the neural network model structure is shown in Table6.Table 6
BP network establishment settings.
FunctionRun settingsNotesNewfftrainlmnet = newff (sr, sc, 17)The hidden layer consists of 17 neuronsnet = trainlm (net, sr, sc)The network is trained using the BP algorithm and the parameters are continuously adjusted.Net.trainparam.epochs = 980;Net.trainparam.ir = 0.12;Set a training goal of 0.000000001.Thennet.trainparam.goal = 0.000000001.In this study, the neural network is established in the continuous learning training, the error is constantly reduced in the expected 900 steps, the error rate control at 3% can be completed in a relatively short period of time to fit the data, and basically the prediction of college students’ psychological problems research is achieved.


## 6. Simulation Test

### 6.1. Example Analysis of Prediction of Factors Affecting Mental Health

The statistical values of the factors affecting mental health for the six years starting from 2002 to 2007 were used as a sample to predict the values of the factors in 2008. We used statistical values of the factors affecting mental health from 2003 to 2008 as a sample to predict the value of 2009 for each factor, and calculated the error so that the square root error between the predicted value and the real value was limited to 1%. At this point, the coefficients of the BP neural network were trained accurately, and finally the statistical values of the mental health factors from 2004 to 2009 were used as samples to predict the values of 2010 for each factor. It should be noted that since the “other” factor is the sum of other factors and 1 by subtraction, it has no effect on the overall error of the network, so it can be excluded when making the error, that is, the square root error of the predicted value and the true value does not include the “other” factor. “ factor.As an example, the values of the factors affecting mental health in 2009 were predicted. The structure and model of the neural network are as follows: (1) input layer and output layer: the statistical values of the factors from 2003 to 2008 were used as the input vector, with 6 nodes, and the statistical values of the factors in 2009 were used as the training sample, with 1 output node; (2) the hidden layer: the nodes of the hidden layer are not unique, and the prediction results of 2009 are compared with the error size, and the model is trained to contain 4 hidden layer nodes; and (3) parameter determination: initial weightsw = −0.2∼0.2, learning rate LP. r = 0.1, inertia coefficient = 0.6, correction period T = 10, and number of training steps = 500.The command to build the BP network is net = newff (a, b,{‘tansig’, ‘purelin’}, ‘traingd’), and the command to train the network is [net, tr] = train (net, p, t). The training samples are substituted back into the network for simulation, and the command b = sim (net, p1) is implemented, where b is the prediction result and p1 is the training sample. The training error curve of the network is shown in Figure 1, and it can be seen that the network has good training results. The comparison curve between the predicted and true values for 2009 is shown in Figure 4, and the overall square root error is within 1%, thus indicating that the model can be used to predict the factors affecting mental health in the next year. The predicted results of the factors affecting mental health in 2009 are shown in Table 7.Figure 3
Predicted versus predicted values of mental health factors.Table 7
Predicted values of factors affecting mental health in 2009.
Shadow response factorGreat pressure on personal futureGao cheng is not ideal for performance appraisalPersonal feelings are frustratingTongguan spearology department shieldFather’s period is too long and mother’s expectation is highFamily positive difficultiesOtherWeight0.2680.0230.2660.1420.1540.0330.026The training error curves of the network all show that the network is well trained, and the square root error of the sum of the predicted and true values of the factors affecting mental health is within the acceptable range of the results, leading to the prediction results for 2010. The final prediction results are shown in Figures3 and 4 and Table 8.Figure 4
Training error curve.Table 8
Predicted values of factors affecting mental health in 2010.
FactorGreat pressure on personal futureThe score of college entrance examination is not idealPersonal emotional frustrationContradiction of classmate relationshipParents expect too muchOtherb0.2740.0110.2740.1420.1610.031


### 6.2. Real Case

The test data were entered into the constructed neural network model for simulation testing, and it can be concluded through several groups of data simulation tests that the error of each group of prediction results is relatively small and basically meets the requirements, proving that the model can predict the problem for the studied sample condition, as shown in Table9.Table 9
Simulation test.
FunctionRun settingsSimmapminmaxAn = sim (net, sr test)Bpsc-mapminmax (reverse, an, s)In this study, the factors affecting college students’ psychological problems are mapped to the corresponding mental health conditions through BP neural network learning training, and after feature selection, continuous learning training, and self-training, such that the initial weights and thresholds are adjusted to achieve problem prediction and complete result comparison, as shown in Table10.Table 10
Analysis of results for some sample data.
S. no.Prediction outputStandard valueAbsolute errorRelative error (%)11.781−0.132−8.8122.212−0.089−5.3431.9710.0752.0941.7610.1213.6752.082−0.097−2.4562.1220.9244.5671.891−0.2162.09


## 6.1. Example Analysis of Prediction of Factors Affecting Mental Health

The statistical values of the factors affecting mental health for the six years starting from 2002 to 2007 were used as a sample to predict the values of the factors in 2008. We used statistical values of the factors affecting mental health from 2003 to 2008 as a sample to predict the value of 2009 for each factor, and calculated the error so that the square root error between the predicted value and the real value was limited to 1%. At this point, the coefficients of the BP neural network were trained accurately, and finally the statistical values of the mental health factors from 2004 to 2009 were used as samples to predict the values of 2010 for each factor. It should be noted that since the “other” factor is the sum of other factors and 1 by subtraction, it has no effect on the overall error of the network, so it can be excluded when making the error, that is, the square root error of the predicted value and the true value does not include the “other” factor. “ factor.As an example, the values of the factors affecting mental health in 2009 were predicted. The structure and model of the neural network are as follows: (1) input layer and output layer: the statistical values of the factors from 2003 to 2008 were used as the input vector, with 6 nodes, and the statistical values of the factors in 2009 were used as the training sample, with 1 output node; (2) the hidden layer: the nodes of the hidden layer are not unique, and the prediction results of 2009 are compared with the error size, and the model is trained to contain 4 hidden layer nodes; and (3) parameter determination: initial weightsw = −0.2∼0.2, learning rate LP. r = 0.1, inertia coefficient = 0.6, correction period T = 10, and number of training steps = 500.The command to build the BP network is net = newff (a, b,{‘tansig’, ‘purelin’}, ‘traingd’), and the command to train the network is [net, tr] = train (net, p, t). The training samples are substituted back into the network for simulation, and the command b = sim (net, p1) is implemented, where b is the prediction result and p1 is the training sample. The training error curve of the network is shown in Figure 1, and it can be seen that the network has good training results. The comparison curve between the predicted and true values for 2009 is shown in Figure 4, and the overall square root error is within 1%, thus indicating that the model can be used to predict the factors affecting mental health in the next year. The predicted results of the factors affecting mental health in 2009 are shown in Table 7.Figure 3
Predicted versus predicted values of mental health factors.Table 7
Predicted values of factors affecting mental health in 2009.
Shadow response factorGreat pressure on personal futureGao cheng is not ideal for performance appraisalPersonal feelings are frustratingTongguan spearology department shieldFather’s period is too long and mother’s expectation is highFamily positive difficultiesOtherWeight0.2680.0230.2660.1420.1540.0330.026The training error curves of the network all show that the network is well trained, and the square root error of the sum of the predicted and true values of the factors affecting mental health is within the acceptable range of the results, leading to the prediction results for 2010. The final prediction results are shown in Figures3 and 4 and Table 8.Figure 4
Training error curve.Table 8
Predicted values of factors affecting mental health in 2010.
FactorGreat pressure on personal futureThe score of college entrance examination is not idealPersonal emotional frustrationContradiction of classmate relationshipParents expect too muchOtherb0.2740.0110.2740.1420.1610.031


## 6.2. Real Case

The test data were entered into the constructed neural network model for simulation testing, and it can be concluded through several groups of data simulation tests that the error of each group of prediction results is relatively small and basically meets the requirements, proving that the model can predict the problem for the studied sample condition, as shown in Table9.Table 9
Simulation test.
FunctionRun settingsSimmapminmaxAn = sim (net, sr test)Bpsc-mapminmax (reverse, an, s)In this study, the factors affecting college students’ psychological problems are mapped to the corresponding mental health conditions through BP neural network learning training, and after feature selection, continuous learning training, and self-training, such that the initial weights and thresholds are adjusted to achieve problem prediction and complete result comparison, as shown in Table10.Table 10
Analysis of results for some sample data.
S. no.Prediction outputStandard valueAbsolute errorRelative error (%)11.781−0.132−8.8122.212−0.089−5.3431.9710.0752.0941.7610.1213.6752.082−0.097−2.4562.1220.9244.5671.891−0.2162.09


## 7. Conclusion

Combined with the mental health characteristics of college students at the present stage in China, the data of internal and external influencing factors are reprocessed to establish a neural network prediction model, and the BP algorithm is used for continuous learning and training. The multilayer forward BP network applied in the model itself still has some defects, for example, the learning speed is very slow, it is easy to fall into local minimal values, and the contradiction between the prediction ability of the network and the training ability. However, compared with the traditional methods for predicting the mental health status of college students, the prediction method of BP neural network avoids the tedious conventional modeling process. This study establishes a mathematical prediction model based on the principle of BP neural network, which can change the parameters of the network, making the calculation of the prediction system simple and flexible, and greatly improving the model prediction efficiency and prediction accuracy. To a certain extent, it provides a reference for the study of college students’ mental health.In future, we plan to include and consider more characteristics, such as family history, social circle, drug history, educational background, and many more. Apart from these characteristics, different correlational models will be tested and for the prediction, deep learning-based models will be tested.



---

*Source: 5759239-2022-01-10.xml*