## 3 Case Study
### Model Establishment  
The principles of MLR, KNN, SVR, CART, and BPNN have been introduced in detail in Section 2, and an optimization algorithm-genetic algorithm was also described. For the first four algorithms, on the one hand, these algorithms are relatively simple and have fewer hyperparameters. In this regard, this paper used python language for code programming, and the sk-learn library was imported to quickly build the prediction model. The input parameters will follow the various strategies presented in Section 2.7. In terms of hyperparameters, the MLR model had no hyperparameters, and for the KNN, the default value of the model was \(k=5\). The quality of the SVR model was mainly related to the kernel function. In this paper, 'rbf' kernel function is selected to effectively deal with nonlinear regression problems. The main hyperparameter of CART was the depth of the tree. The greater the depth, the more branches of the tree and the more features of the extracted data, which can make the prediction result of the model approximately close to the real value. However, on the other hand, this also increases the complexity of the model, which will reduce its generality, and lead to the phenomenon of overfitting of the model. In this regard, this paper will calculate the model loss for each depth of the decision tree, and the optimal depth will be used as a hyperparameter for latter CART model.  
For the BPNN, as an intelligent algorithm, it has higher operability and more hyperparameters. Both the number of network layers and the number of nodes per layer have a great impact on the network accuracy. In addition, the choice of activation function between layers is also a big task. The Kereas library provides us with many activation functions--such as'relu', 'tanh', 'elu', etc.--which can better analyze the nonlinear relationship of data in the model. Optimizers--such as 'adam' and'sgd'--can speed up model convergence and train the best model better and faster. In addition, batch size is also a hyperparameter worth considering for the size of the batch data read each time during model training will affect the learning rate. If it is too large, the model cannot take into account some details, and if it is too small, it is easy to reduce the generalization ability of the model. In this way, the number of hyperparameter combinations involved in building a BPNN model is huge. In this paper, we introduce a genetic algorithm accordingly. By geneticizing each hyperparameter, each hyperparameter combination as a gene. The model of survival of the fittest is inherited, and finally, the algorithm can help us select the optimal combination of hyperparameters, which can make our model best adapt to our data situation. In this regard, we first set up the gene pool of the genetic algorithm. For the number of layers of the model, we set up four kinds of genes--1, 2, 3, and 4. For the neurons of each layer, we will select from the list [10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 25, 28, 32, 45, 64, 100, 128]. In terms of activation function,'relu', 'elu', 'tanh','sigmoid', 'hard_sigmoid','softplus', and 'linear' will be chosen as gene library. As for the optimizer, we provide the list 'adam','sgd', 'adagrad', 'adadelta', 'adamax', and 'nadam'. The batch size is selected from the list [10, 12, 16, 32, 48, 64, 128].  
By using the genetic algorithm, repeated combining hyperparameters will be avoided, so the speed and efficiency of our model building will be improved.