Classification of Ancient Glass Based on Perceptron Model

: Weathering process will make a lot of elements inside the glass and environment elements exchange, resulting in the change of the composition ratio. In order to classify and subclassify ancient glass products, this paper uses the perceptron model improved based on particle swarm optimization to solve the binary classification problem of high-potassium glass and lead-barium glass. With the accuracy of prediction as the objective function, the 14-dimensional weight vector is obtained by learning all the data sets that have been converted to un-weathered. In the further subclass division, cluster analysis was used in this paper to subdivide the two kinds of glass, high potassium and lead barium, respectively, and finally they were divided into three categories.


Introduction
The study of chemical composition, isotope ratio and various physical properties of ancient glass is a very important aspect in the study of ancient glass, which can provide scientific evidence for archaeological research and contribute to the study of composition system, manufacturing age, preparation process and technological origin of ancient glass [1] . Zhou Gengzhen [2] explored the factors affecting the weathering of silicate glass. Bradford Henry [3] et al. studied the structure of ancient glass by 29 Si Magic Angle Spinning NMR Spectroscopy .Hu Zhizhong [4] et al. studied the influencing factors in the quantitative analysis of ancient glass elements by LA-ICP-MS, which provided support for the study of its origin .SeanP.Rigby [5] et al. studied the structure and chemical heterogeneity of ancient glass using gas supercooled condensate, X-ray tomography and solid-state nuclear magnetic resonance. Chen Songlin [6] explored the composition of glass and further analyzed the application of glass reference materials . So there is very little research on the classification of ancient glass. This paper regards the classification of glass types as a binary classification problem. The hyperplane of the two classification models was obtained by the concrete model, and the weight of each chemical component corresponding to the hyperplane was taken as its classification rule. In the further subclassification, this paper first determines several indicators, conducts cluster analysis through a few indicators, and describes its specific classification through the results of cluster analysis. Then the rationality and sensitivity of the classification results are explained. Therefore, this method has important practical significance for the identification of Chinese ancient glass products.

Binary classification model of high potassium Pb barium glass
Because ancient glass is vulnerable to burial conditions. During weathering, internal elements exchange a lot with environmental elements, resulting in a change in their composition ratio, which affects the correct judgment of their category. There is a batch of ancient glass data before weathering. Therefore, according to the data of all types of glass before weathering, the classification rules of high-potassium glass and lead-barium glass are analyzed. In other words, a hyperplane can be obtained to divide all types of glass into high-potassium glass and lead-barium glass. Perceptron model is a linear classifier. Its goal is to train the separation hyperplane that can perform linear binary classification of data through training data. It has the characteristics of simple operation, fast convergence and practical value [7] .The specific mode of perceptron model operation is shown in Figure 1. In the perceptron learning process, particle swarm optimization is adopted in this paper to optimize its accuracy. PSO is optimized by particle following the best solution found by itself and the best solution of the whole group. This algorithm is simple and easy to implement with few adjustable parameters [8] , and it is expected to obtain the learning factor with the highest accuracy through this optimization method.
Specific calculation steps are as follows: (1) Initialize the grid and learning parameters, such as setting the grid initial weight matrix, learning factors, etc.
The random generation function rand of Matlab2020a was used to generate a random 14dimensional weight vector weight vector as the dendrite weight of each neuron. Expand the search to (-100, 100), taking into account time and space complexity. If the range is enlarged, the accuracy of the results can be improved, but the time complexity is higher. If the range is narrowed, the time complexity can be reduced but the result accuracy is low. The random number on its boundary is: rand() generates random numbers in the range -1 to 1.
The perceptron model improved based on particle swarm optimization relies on the particle algorithm to find out the best 14-dimensional weight vector after continuous iterative optimization.
According to the characteristics of particle swarm optimization, its learning factor is set to 0.5. The setting of this neural network is a multi-input and single-output structure, which requires an output threshold. According to the sum of each chemical composition of the glass is 100, the parameter range of the weight is between -100 and 100, and it has a strong theoretical basis to take the middle value 0 as the threshold.
(2) Provide training mode and training network, optimize the training process through particle swarm optimization algorithm, so that the accuracy reaches the maximum.
For this one-dimensional parameter optimization, in order to find the best input and output, the particle algorithm is constantly used to iteratively change the value of the parameter, and the objective function is used to output the optimal solution. The optimal solution is constantly iterated to optimize the most correct value. The specific objective function is as follows: m represents the total number of cultural relics; yi is the ith output function ; ei represents the values corresponding to the specific type of the ith chemical component, namely 0 and 1; ωi represents the learning weight; θ indicates threshold value; xi is the number corresponding to the ith chemical component.
Here, the learning set, namely the classification of chemical components of various types of glass given in the title, is used for input, and the types of glass, namely high-potassium glass, lead-barium glass (0 and 1), are used for output.
The input of the objective function, namely the weight vector, is judged to be correct by the result verification, and the overall accuracy rate is output by the objective function. The optimization of the objective function is the particle swarm optimization algorithm, which randomly allocates the population particles into the solvable space. In this case, 14 dimensions are taken as the solution of the target space, and the algorithm constantly changes each particle by finding the best space. The specific optimization formula is as follows: Where, vij(t) is the speed in the tth generation, xij(t) is the position in the tth generation, r1 and r2 are 0 or 1 random numbers obeying Bernoulli distribution, which can increase the randomness of particle flight. vij∈［-Vmax, Vmax］, i=1, 2, …, N, j=1, 2, …, D. Vmaxis a constant set by the user to limit the speed of particles. c1 and c2 are called acceleration factors or learning factors.
According to the above steps, this paper trains all unweathered glass of two types, and finally obtains the corresponding weight vector. Continuous iteration of the output of the optimal value will find the best fourteen weights, as a regular feature of all elements.

Glass subclassification based on clustering
In order to select appropriate chemical components for subclassification of each category, this paper first tried to use principal component analysis to reduce the dimension of 14 chemical components. After SPSS26.0 calculation, we obtained KMO values as shown in Table 1: .000 As can be seen from Table 1, KMO value <0.6 is not suitable for principal component analysis. Therefore, the dimensionality reduction method in this paper is to select the three most representative chemical components for subclassification, and the first three chemical components with the highest content are the representative chemical components in all cultural relics samples, namely silica (SiO2) and alumina (Al2O3) lead oxide (PbO).At the same time, this paper selects chemical components with large contents in all cultural relics samples to conduct cluster analysis of glass categories based on the distance between these three components. Specific analysis steps are as follows: (1) Calculate the distance between each pair of sample points in the two types of glass respectively, denoted as matrix .
(2) Firstly, 19 and 39 classes are constructed respectively, that is, each class contains only one sample point, and the platform height of each class is 0.
(3) For each category (namely, high potassium glass and lead barium glass), the two categories closest to each other are merged into the new category, and the distance between the two categories is taken as the height of the platform in the clustering diagram.
(4) Calculate the distance between the new class and the current class. If the number of classes is equal to 1, go to step (5); otherwise, go back to step (3).
(5) Draw the cluster diagram of high potassium glass and lead barium glass respectively. (6) Select the number of categories according to the needs of this paper, and further explain the specific classification results.

The solution of the binary classification model of high potassium Pb barium glass
Solving by Matlab2020, in the perceptron model optimized by particle swarm optimization algorithm, the number of iterations is set as 10, 20 and 50 respectively. With the increase of the number of iterations, the specific process of increasing the adaptation value is shown in Figure 2.  Figure 2, this paper finds that with the increase of the number of iterations, the learning rate will gradually approach 1, and the learning efficiency will be better.
In order to more vividly reflect the changes in the specific learning process of the perceptron based on particle swarm improvement, this paper draws a diagram of its changes in the learning process through Matlab2020a, as shown in Figure 3:  Figure 3, it can be analyzed that most of the weight vectors can be approximated to 1 each time they are updated, but a few will not reach 1 and fall into local optimization in advance.
Finally, 5 groups of different learning weight vectors were obtained by solving Matlab2020, and a hyperplane could be obtained by multiplying each group of vectors with its chemical composition. The hyperplane could be used to divide the two types of glass in multidimensional space, which could be used as the classification rule of high-potassium glass and lead-barium glass. The five weight vectors are shown in Table 2.

The solution of the subclassification of glass categories based on clustering
Through MATLAB2020a clustering, this paper obtained the subclassification of high-potassium glass and lead-barium glass. The high-potassium glass and lead-barium glass were subdivided into three categories, including 1 sample of high-potassium glass type 1, 17 samples of type 2, 1 sample of Type 3, 1 sample of lead-barium glass type 1, 36 samples of type 2, and 2 samples of type 3.
The clustering diagram for high potassium glass is shown in Figure 4:  Analysis was made on the results after the division of high potassium glass and lead barium glass: The first type of high potassium glass: silica content up to 81.7%, that is, this glass is pure silica glass (containing silica content up to 80%).
The second type of high potassium glass: silica content up to 64.9% and alumina content up to 6%, although the content difference is 10 times, but compared with other types, this kind of alumina content is larger, so this non-weathered glass is: SiO2-Al2O3 class glass.
The third kind of high potassium glass: through calculation, the lead oxide content of this kind of glass is 6% of the content of alumina, so this kind of weathering glass is: Al2O3-PbO class glass.
The first type of lead-barium glass: the content of lead oxide is close to 60%, and the content of silica is only 20%, so this non-weathered glass is PbO-SiO2 glass.
The second type of lead-barium glass: the proportion of this glass is relatively ordinary, therefore, this type of non-weathered glass is normal glass.
The third type of lead-barium glass: compared with the first type of glass, the proportion of lead oxide content is lower, compared with the second type of glass silica content is lower, therefore, this type of non-weathered glass is: missing glass.

Rationality analysis of subclassification
The results of subclassification are tested for reasonableness, and Monte Carlo random simulation test is adopted in this paper. Firstly, a cultural relic is determined in the three categories of each category subdivision. Since there is only one cultural relic in Type 1 and Type 3, it can be determined without selection. Then, two kinds of cultural relics are randomly selected from the second kind of cultural relics through Monte Carlo random simulation, and the rationality of this classification is proved by calculating that their absolute distance is the minimum among these distances. Finally, the distance between the two values of the second type is the minimum through random value calculation, and no abnormal situation is found, so it can be considered that the clustering analysis results are reasonable.

Conclusions
In this paper, the improved perceptron model based on particle swarm optimization was adopted to solve the binary classification problem of high-potassium glass and lead-barium glass. The 14dimensional weight vector was learned by learning all unweathered data sets, and the weight vector was obtained to divide the two types of glass. In the case of divided into two categories, cluster analysis is used to carry out subdivision, and three categories are obtained respectively. In addition, particle swarm optimization of perceptron in this paper improves the learning efficiency of perceptron, and more accurate results can be obtained within an effective time. This method is of great significance in other optimization problems.