# Linear Optics Calibration in a Storage Ring Based on Machine Learning
## 2 Materials and Methods
### Theory of Linear Optics Calibration
#### 2.1.2 Machine Learning Theory  
A new idea for linear optics calibration is the application of machine learning. In recent years, with the mature development of machine learning and neural networks, the data-driven method has been applied in many different fields [24]. It does not require any assumptions or prior knowledge. Through the neural network model, the method provides a completely data-based information mining tool. Through the machine-learning-based method, the machine parameters can be predicted according to the measured orbit response matrix. Machine learning uses neural networks to fit data made up of many neurons that can solve complex problems. These neurons are the most basic components of neural networks, proposed by [PERSON] and [PERSON] in 1943 [25]. Neurons can take input from other neurons or external data and then calculate an output. The output data are obtained by weighting the input data, adding the bias, and finally calculating the activation function. Figure 1 shows a schematic illustration of a neuron. For dense neural networks, each layer is composed of several neurons or a single neuron, and all neurons in the previous layer connect to those in the next layer. Dense neural networks cannot handle multidimensional data well, but CNN overcomes this shortcoming well. The greatest problem with using dense neural networks to process multidimensional data is that there are too many parameters in the dense layers. In addition to slowing down the computational speed, increasing the number of parameters can easily lead to overfitting. A reasonable neural network structure is needed to effectively reduce the number of parameters in neural networks, and CNN can better achieve this goal. This is because CNN has sparse connection and weight-sharing characteristics [26]. The first CNN was the time delay neural network (TDNN) proposed by [PERSON] et al. in 1987 [27]. TDNN was applied to the speech recognition problem. In 1989, [PERSON] constructed a CNN for computer vision problems that was successfully applied to the recognition of handwritten zip code digits provided by the U.S. Postal Service. He first used the word 'convolution' in his discussion of his network structure [28]. After the 21 st century, with the introduction of deep learning theory and the improvement in computing equipment, CNNs have been rapidly developed and applied to computer vision, natural language processing, and other fields [29; 30; 31]. CNN mimics the visual perception mechanism of organisms, i.e., when neurons with the same parameters are applied to different positions in the previous layer, a shift-invariant feature can be obtained. It is a type of feedforward neural network that includes convolutional computation, which can perform supervised learning and unsupervised learning [29]. The CNN layers can be classified into the input layer, hidden layers, and output layer. The input data enter the input layer and then enter the hidden layers for calculation. The calculation results of the hidden layers are transmitted to the output layer for output. This is the forward propagation of the signals from input to output. The CNN input layer can process multidimensional data, usually three-dimensional data. The CNN hidden layer contains the convolutional layer, and the pooling layer and the dense layer are optional. The function of the convolutional layer is to extract features from the input data. It contains multiple kernels, and each element of the kernel corresponds to a weight, which is similar to a neuron. For a convolutional layer, data processing requires two processes, first convolution and then activation. In the convolution calculation, the kernels periodically scan the input data and perform matrix element multiplication and summation on the input data in the receptive field. The receptive field size depends on the kernel size. Figure 2 shows an example of convolution with a stride of 1. Each kernel has a bias, and then each convolutional layer has an activation function.