# Sports Risk Prediction Model Based on Automatic Encoder and Convolutional Neural Network
## 3 Sports Risk Prediction Model Based on Automatic Encoder and Convolutional Neural Network
### Construction of Sports Risk Prediction Model  
#### 3.3.1 AE Model Construction  
The motion risk dataset has a relatively high data dimensionality, a lot of noise, and is computationally intensive, which can lead to a decrease in the accuracy of the experimental results. Nearly 75% of the data in this dataset are marked as 0 during feature coding, which causes the overall sample to be very sparse. And when the number of samples is not sufficient, the predictive power of the model decreases as the number of feature dimensions increases. In machine learning, feature extraction is a key step that removes this invalid information and allows the model to more accurately identify data patterns and structures. Autoencoder (AE) is an unsupervised learning neural network model whose goal is to learn the inherent features of the data, compress high-dimensional data into a low-dimensional representation, and retain the important features of the data while reducing its size. Since the cleaned motion risk data is 65-dimensional, it would take a long time to train and predict the data directly into the convolutional neural network, but if we use the self-encoder to extract the deep features first, we can not only reduce the feature dimensionality of the incoming convolutional neural network model but also improve the classification accuracy. The self-encoder used in this chapter has five layers, three of which are hidden. The ReLU function is selected as the activation function of each layer of the network, Adam is used as the optimizer, and the learning rate is set to 0.001. Firstly, the input and output layers of the model are set, and the number of nodes in the input layer is the same as the dimension of the data, which is set to 65, and the number of nodes in the output layer is the same as the number of nodes in the input layer. Next, the core part of the AE model, i.e., the coding layer, is constructed. The AE model can compress 65-dimensional data into a low-dimensional hidden representation through the hidden layer. The number of nodes in the encoding layer is less than the number of nodes in the input layer, thus achieving data compression. In contrast to the encoder, the decoder layer can decode the low-dimensional hidden representation into a high-dimensional feature space with the same number of nodes as the input layer nodes, which is used to reconstruct the original data. The training of the model is then performed, and the training of the  
Figure 2: Importance of sports risk characteristics based on IG. AE model is an unsupervised process, i.e., no label information is involved. During the training process, the model parameters are optimized by minimizing the reconstruction error, which ensures information transfer during backpropagation and the correct gradient update. After the training is completed, the AE model saves the encoder, which is used to extract the motion risk data features. The structure of the autoencoder in this chapter is shown in Figure 3.  
The self-encoder includes two stages: encoding and decoding. The data dimension reduction corresponds to the encoding stage. The specific process is as follows:  
First, input 65-dimensional sports risk data \(X=\{x_{1},x_{2},\cdots,x_{65}\}\). The automatic encoder maps \(x\) to a hidden layer and uses the hidden layer structure to compress the data into \(Z=\{z_{1},z_{2},\cdots,z_{m}\}\). The number of hidden layer neurons represents the essential dimension of high-dimensional input data. The specific form of hidden layer output \(Z\) is:  
\[Z=\sigma(\omega\cdot X+b) \tag{6}\]  
where \(\sigma\) is the sigmoid function, \(\omega\) is the weight coefficient between the input layer and the hidden layer, and \(b\) is the offset term. Then, the output result \(Z=\{z_{1},z_{2},\cdots,z_{m}\}\) of the encoder is taken as the input of the decoder and decoded into \(X^{\prime}=\{x^{\prime}_{1},x^{\prime}_{2},\cdots,x^{\prime}_{65}\}\). At this time, the \(X^{\prime}\) of the output layer has the same structure as the \(X\) of the input layer.