Borate glass optical band gap prediction and verification method based on machine learning algorithm
By constructing and optimizing the ANN model, the problem that existing neural network technologies cannot effectively predict small-scale data sets is solved, and efficient optical bandgap data prediction is achieved and adapted to the prediction of small-scale data sets.
Patent Information
- Application Number
- CN202510311720.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-17
AI Technical Summary
Existing neural network technologies cannot effectively predict optical bandgap data of small-scale data sets, and parameters need to be entered every training, resulting in inefficient prediction.
By building an ANN model, defining the parameter range, and combining the model evaluation score to optimize the neural network model, adding a for loop for automatic training, improving the running efficiency of the model, and implementing a prediction method of training and evaluation while maintaining.
It improves the running efficiency of the model, avoids the disadvantage of requiring once to enter parameters for each training, enhances the accuracy of the result value, and is adapted to the prediction of small-scale data sets.
Smart Images

Figure CN120162673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical band gap prediction, and particularly relates to a method for predicting and verifying the optical band gap of borate glass based on a machine learning algorithm. Background Art
[0002] Due to its unique advantages, borate glass has a wide range of application fields. It has a high transmittance and a low refractive index in the ultraviolet to infrared bands. Its transmittance usually depends on the optical band gap. The larger the band gap, the stronger the absorption of the glass to ultraviolet light and the higher the visible light transmittance. There are usually two methods for measuring the optical band gap: one is the ultraviolet-visible spectrophotometry method, which calculates the optical band gap by measuring the transmittance or absorption spectrum of the glass and using the Tauc plot; the other is the ellipsometry method, which indirectly calculates the optical band gap by measuring the complex refractive index of the glass. Both of these methods require synthesizing the glass through experiments and then measuring it; or using empirical formula methods and first-principles calculations of the optical band gap. However, these experimental or theoretical calculation methods have large computational amounts, high time costs, and high resource requirements.
[0003] With the development of artificial intelligence technology in the 21st century, machine learning (ML, Machine Learning Model) technology has been gradually applied to the research on the composition-performance of glass. Researchers have continuously used machine learning technology to predict the physical, chemical, thermal, mechanical, electrical / magnetic, optical properties and structure of glass, which fully demonstrates the advantages of machine learning: (1) Based on data-driven, it is good at processing high-dimensional data, can consider the influence of multiple variables on glass properties simultaneously, and through training high-quality data sets, achieve high-precision predictions, even exceeding the accuracy of traditional theoretical calculation methods; (2) ML can be easily extended to new data sets or material systems by simply retraining or fine-tuning the model, improving the research efficiency with less human intervention, reducing unnecessary resource waste and input costs. Machine learning or deep learning DL (Deep Learning) unlocks the relationship between the composition-structure-performance of glass materials, and uses these composition data to predict the properties or structure parameters of glass based on the experimental data of predecessors, improving the glass properties and accelerating the research progress; However, the current research on the optical properties of machine learning mainly focuses on Raman spectroscopy prediction, and the methods for using machine learning to study the composition and optical band gap properties of borate glass are relatively scarce. Moreover, the existing machine learning models for studying the optical band gap data of borate glass composition usually use support vector machines, random forests, decision trees, LASSO (The Least Absolute Shrinkage and Selection Operator) regression, and convolutional neural networks, etc. They have relatively high requirements for the correlation of input and output data and require a large data scale, and there are certain limitations for small-scale prediction data sets. And the existing ML models need to input parameters once for each round of training and cannot be evaluated cyclically, reducing the prediction efficiency, and thus unable to evaluate the accuracy of the finally obtained prediction results, resulting in certain drawbacks in the existing neural network technology. Summary of the Invention
[0004] In order to solve the technical problems that the existing neural network technology cannot predict small-scale data sets, and each training requires inputting parameters once, the process is relatively cumbersome, and the prediction efficiency is reduced, the purpose of the present invention is to provide a method for predicting the optical band gap of borate glass based on machine learning algorithms. The specific technical solutions adopted are as follows:
[0005] Obtain the composition and optical band gap data of borate glass and perform preprocessing, and separate the validation set from the preprocessed composition and optical band gap data of borate glass;
[0006] Construct a database based on the non-validation set data in the preprocessed composition and optical band gap data of borate glass, and generate a training set and a test set based on the database;
[0007] Build an ANN model, define the parameter range of the ANN model, train the ANN model for different parameters based on the training set, and build an ML model by combining the trained ANN model with the model evaluation scores;
[0008] Input the training set into the ML model to obtain evaluation scores, compare all the evaluation scores of the training set to determine the optimal ML model, and obtain the predicted optical band gap data based on the test set.
[0009] Preferably, obtain the borate glass composition and optical band gap data, and perform preprocessing. Separate a validation set from the preprocessed borate glass composition and optical band gap data, including:
[0010] Collect the borate glass composition and optical band gap data from the international glass database, build a total database of data, and perform preprocessing based on the total database to obtain the cleaned borate glass composition and optical band gap data; the preprocessing includes data cleaning methods such as removing outliers, filling in null values, data standardization, and normalization processing;
[0011] Define the preprocessed borate glass composition as input data and the preprocessed optical band gap data as output data, and perform screening based on the input data and output data to obtain a validation set.
[0012] Preferably, build an ANN model and define the parameter range of the ANN model, including:
[0013] Build an ANN model, and the corresponding calculation formula is:
[0014]
[0015] Among them, y represents the output data, that is, the preprocessed optical band gap data; f represents the activation function; n represents the total number of preprocessed borate glass compositions; x i represents the input data, that is, the i-th preprocessed borate glass composition; w i represents the weight corresponding to the i-th preprocessed borate glass composition; b represents the bias parameter;
[0016] The activation function includes any one of the ReLU function, Sigmoid function, and Tanh function; set the number of hidden layers in the ANN model, including at least three ranges: (100), (100, 100), (100, 100, 100);
[0017] Determine the learning rate of the ANN model, and the corresponding calculation formula is:
[0018]
[0019] Among them, w t+1Denote the ANN model parameters at time step t+1; w t Denote the ANN model parameters at time step t; η denotes the learning rate; Denote the gradient of the ANN model parameters; J denotes the loss function;
[0020] Set the learning rate of the ANN model to at least three ranges: 0.001, 0.01, and 0.1.
[0021] Preferably, train the ANN model for different parameters based on the training set, and construct the ML model by combining the trained ANN model with the model evaluation scores, including:
[0022] Set the number of iterations, and iteratively optimize the ANN model for different parameters based on the training set to complete the training of the ANN model;
[0023] Input the training set into the trained ANN model, obtain several evaluation results through the calculation of the model evaluation scores, determine the optimal model parameters based on the evaluation results, and construct the ML model with the optimal model parameters; the model evaluation scores are R 2 , MSE, MAE, MAPE.
[0024] To solve the above technical problems, the present application also provides: A verification method for predicting optical bandgap data based on a machine learning algorithm, which is used to verify the correlation between the predicted optical bandgap data obtained in a borate glass optical bandgap prediction method based on a machine learning algorithm as described in any one of the foregoing items and the borate glass composition. The method includes:
[0025] Input the verification set into the optimal ML model for verification, and judge the prediction effect of the optimal ML model;
[0026] According to the database, calculate the Pearson correlation coefficient between the borate glass composition and the optical bandgap data, and perform importance ranking to analyze the relationship between the input data and the output data;
[0027] Determine the correlation between the borate glass composition and the predicted optical bandgap data by combining the prediction effect and the analysis result.
[0028] Preferably, input the verification set into the optimal ML model for verification, and judge the prediction effect of the optimal ML model, including:
[0029] Input the verification set into the optimal ML model for verification, observe the model evaluation scores of R2, MSE, MAE, and MAPE obtained after calculation by the optimal ML model respectively, set corresponding judgment conditions for any model evaluation score, and determine the prediction effect of the optimal ML model according to the judgment conditions.
[0030] Preferably, according to the database, calculate the Pearson correlation coefficient of the borate glass composition and the optical band gap data, and perform importance ranking to analyze the relationship between the input data and the output data, including:
[0031] According to the database, calculate the Pearson correlation coefficient of the borate glass composition and the optical band gap data. The corresponding calculation formula is:
[0032]
[0033] where r represents the Pearson correlation coefficient; X represents the input data, i.e., the borate glass composition in the database; Y represents the output data, i.e., the optical band gap data in the database; cov represents the covariance; σ represents the standard deviation;
[0034] Obtain the Pearson correlation coefficients of all borate glass compositions and optical band gap data in the database, and sort them in descending order to obtain the linear correlation degree between the borate glass composition and the optical band gap data.
[0035] Preferably, determine the correlation between the borate glass composition and the predicted optical band gap data by combining the prediction effect and the analysis result, including:
[0036] If the Pearson correlation coefficient is 1, it indicates the strongest correlation between the borate glass composition and the predicted optical band gap data;
[0037] If the Pearson correlation coefficient is 0, based on observing the prediction effect of the optimal ML model in the first judgment, determine whether the currently analyzed borate glass composition has an impact on the predicted optical band gap data. If so, it indicates the existence of a correlation between the borate glass composition and the predicted optical band gap data.
[0038] To solve the above technical problems, the present application also provides: a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in any one of the foregoing items.
[0039] The present invention has the following beneficial effects:
[0040] 1. The prediction method for borate glass proposed in this application optimizes the artificial neural network model in deep learning. A for loop is added to the neural network algorithm for automatic training, which improves the running efficiency of the model and avoids the drawback that the existing ML model needs to input parameters each time it is trained. Different parameter ranges of the model are defined to improve the accuracy of finding the optimal prediction result during the training process of the model. Then, the model is trained to output the best evaluation score in combination with the model evaluation score, and the accuracy of the result value is enhanced, realizing a prediction method of training while evaluating. That is, the purpose of predicting the optical band gap of borate glass by means of machine learning is achieved throughout the prediction method, and the influence of glass composition on the optical band gap is studied, making up for the lack of research on glass optical properties using machine learning in current research. The prediction method is easy to understand, cost controllable, efficient and environmentally friendly. This prediction method can be applied to a new dataset and a small dataset of a new glass system, effectively adapting to the problem of improving the efficiency of exploring the relationship between glass composition and optical properties, and expanding the applicable range of the model.
[0041] 2. The verification method for predicting optical band gap data based on machine learning algorithm proposed in this application can predict unfamiliar datasets. The prediction accuracy of the model can be more intuitively judged through the model evaluation score. The Pearson correlation coefficient is calculated to obtain the linear relationship between two variables, and the influence of borate glass composition on the optical band gap prediction result is quantified from the result value, and then the correlation between the two is obtained.
[0042] 3. The present invention also provides a computer storage medium for implementing the foregoing provided method for predicting the optical band gap of borate glass based on machine learning algorithm and the verification method for predicting optical band gap data based on machine learning algorithm. This system has the same beneficial effects as the foregoing method for predicting and verifying the optical band gap of borate glass based on machine learning algorithm, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for description in the embodiments or the prior art. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0044] Figure 1 It is a schematic diagram of the principle of the neural network model of a method for predicting the optical band gap of borate glass based on machine learning algorithm provided by an embodiment of the present invention;
[0045] Figure 2Schematic diagram of comparison between the prediction result and the actual value of a method for predicting the optical band gap of borate glass based on a machine learning algorithm provided by an embodiment of the present invention;
[0046] Figure 3 Schematic diagram of the linear relationship between the composition of borate glass and the optical band gap data of a method for verifying the predicted optical band gap data based on a machine learning algorithm provided by an embodiment of the present invention. Specific embodiments
[0047] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following describes in detail the specific embodiments, structures, features and effects of a method for predicting and verifying the optical band gap of borate glass based on a machine learning algorithm proposed according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0049] The following specifically describes the specific solution of a method for predicting and verifying the optical band gap of borate glass based on a machine learning algorithm provided by the present invention with reference to the accompanying drawings.
[0050] Existing machine learning models for studying the optical band gap data of borate glass compositions have high requirements for the correlation between input and output data, require a large scale of data, cannot make predictions for small-scale data, and cannot perform cyclic evaluation, reducing the prediction efficiency and affecting the evaluation accuracy, resulting in certain limitations in the existing neural network prediction methods; the first embodiment of the present invention provides a method for predicting the optical band gap of borate glass based on a machine learning algorithm, which optimizes the existing neural network model by defining different parameter ranges of the model, combines the model evaluation scores, and adds a for loop for automatic training, improving the running efficiency of the model, avoiding the drawback that the existing ML model needs to input parameters once for each training, and realizing a prediction method of training and evaluating simultaneously; and it is verified by a method for verifying the predicted optical band gap data based on a machine learning algorithm provided by the second embodiment of the present invention, making the entire optimal prediction model suitable for predicting small-scale unfamiliar data sets and expanding the applicable range of the model; to solve the above two methods, the third embodiment of the present invention provides a computer storage medium, which is essentially a software system composed of units that implement corresponding functions, and now the specific steps in the method are introduced in detail.
[0051] Please refer toFigure 1 , which shows a schematic diagram of the principle of a neural network model of a method for predicting the optical band gap of borate glass based on a machine learning algorithm provided by an embodiment of the present invention. The method includes:
[0052] Step S1: Obtain borate glass composition and optical band gap data, and perform preprocessing. A validation set is separated from the preprocessed borate glass composition and optical band gap data;
[0053] Step S2: Construct a database based on the data of the borate glass composition and optical band gap data other than the validation set after preprocessing, and generate a training set and a test set based on the database;
[0054] Step S3: Construct an ANN model, define the parameter range of the ANN model, train the ANN model for different parameters based on the training set, and construct an ML model by combining the trained ANN model with the model evaluation score;
[0055] Step S4: Input the training set into the ML model to obtain evaluation scores, compare all the evaluation scores of the training set to determine the optimal ML model, and obtain predicted optical band gap data based on the test set.
[0056] For better illustration, borate glass is an inorganic non-metallic material widely used in modern technology fields and daily life; the optical band gap data reflects the energy difference between the valence band and the conduction band in a solid material. Predicting the optical band gap data of borate glass has an important impact on the properties such as the light transmittance, absorbance, and photoelectric conversion efficiency of the material. Therefore, quickly and accurately predicting the optical band gap data of borate glass can better understand the electronic structure characteristics of borate glass and its potential value in different applications, and can provide important references for the design, preparation, and application of materials, optimize the properties of materials, and improve their application value in the optoelectronic field.
[0057] Further, in step S1, it includes:
[0058] Step S101: Collect borate glass composition and optical band gap data from the International Glass Database, construct a total data library, and perform preprocessing based on the total data library to obtain the cleaned borate glass composition and optical band gap data; the preprocessing includes data cleaning methods such as removing outliers, filling in null values, data standardization, and normalization processing.
[0059] Preferably, in this embodiment, the International Glass Database refers to the INTERGLAD International Glass Database, that is, obtain detailed borate glass composition and optical band gap data from the INTERGLAD International Glass Database to provide diversified research data for the follow-up.
[0060] Specifically, borate glass compositions and optical band gap data are screened from the international glass database to construct a total database, and the borate glass compositions and optical band gap data are mapped one by one. For the convenience of subsequent algorithm learning, the borate glass composition is the molar ratio of the glass component elements; then the total database is subjected to feature processing, that is, the original data therein is converted into features to better represent the actual problems processed by the prediction model, improve the accuracy of predicting unknown data, and improve the flexibility of the data; then the data after feature processing is cleaned by preprocessing methods such as removing outliers, filling in null values, data standardization, and normalization to reduce the probability of underfitting or overfitting phenomena occurring during the training process.
[0061] Step S102: Define the preprocessed borate glass composition as the input data and the preprocessed optical band gap data as the output data, and a validation set is obtained by screening based on the input data and the output data.
[0062] It should be noted that the input data is the preprocessed borate glass composition, that is, the feature variable; the output data is the preprocessed optical band gap data, that is, the target variable; a part of the data is selected from the feature variable and the target variable as the validation set, which does not participate in the model establishment, training, and prediction processes, and is only used to verify the prediction effect of the established and trained model later; for example, assuming that the total number of data in the aforementioned constructed total database is 551, the proportion of data in the validation set is 10%.
[0063] It can be explained that in step S2, a database is constructed according to the data in the preprocessed borate glass composition and the non-validation set of the optical band gap data, and a training set and a test set are generated based on the database, that is, the data remaining in the total database after screening out the validation set forms a new database, and a training set and a test set are generated from this database; optionally, in this embodiment, the data in the database is divided into a training set and a test set according to a ratio of 8:2 to provide data support for subsequent model establishment.
[0064] Furthermore, in step S3, an ANN model is constructed, and the parameter range of the ANN model is defined, including:
[0065] The ANN model is constructed, and the corresponding calculation formula is:
[0066]
[0067] Among them, y represents the output data, that is, the preprocessed optical band gap data; f represents the activation function; n represents the total number of preprocessed borate glass compositions; x i represents the input data, that is, the i-th preprocessed borate glass composition; w i represents the weight corresponding to the i-th preprocessed borate glass composition; b represents the bias parameter;
[0068] The activation function includes any one of the ReLU function, the Sigmoid function, and the Tanh function; set the number of hidden layers in the ANN model, including at least three ranges: (100), (100, 100), and (100, 100, 100).
[0069] Specifically, first call the TensorFlow library, which is an open-source software library for building and training machine learning models, to build a neural network model. Combining with the attached Figure 1 As can be seen, the input layer is used to store input data, that is, to store the borate glass composition in the training set; then it is transmitted to the hidden layer, which may include multiple hidden layers. Each hidden layer contains multiple neurons, and each neuron contains any one of the ReLU function, the Sigmoid function, and the Tanh function as the activation function, which is used to process the data transmitted from the input layer; after being processed based on the three ranges of (100), (100, 100), and (100, 100, 100) respectively, it is transmitted to the output layer to obtain output data, that is, the optical bandgap data of the borate glass composition.
[0070] It can be understood that the activation function introduces non-linearity to the output of the neuron, which can improve the processing ability of the ANN model and enable it to process more complex patterns; in this embodiment, it includes the ReLU function, the Sigmoid function, and the Tanh function. During the training process, one of these three activation functions is randomly selected for training each time, and each of these three functions will be selected and used for training under each training condition. Each time the ANN model is trained, a set of results will be output, and this result includes the number of hidden layers, the type of activation function, the learning rate, and the evaluation score, etc. That is, each time the model selects an activation function for training, a set of model evaluation scores will be output.
[0071] It can be explained that the ReLU function can effectively alleviate the problem of gradient disappearance, ensure that the gradient is a constant in the positive interval, and help to accelerate the training speed of the model and improve the convergence efficiency. Among them, the gradient represents the adjustment direction of each parameter in the model to minimize the loss; the Sigmoid function can compress the output data to between [0, 1], that is, interpret the output data as a probability value, and is commonly used in binary classification problems; the Tanh function represents the hyperbolic tangent function, and the output data is between [-1, 1]. Compared with the Sigmoid function, it has better convergence and is symmetric about the origin, which helps to alleviate the problem of gradient disappearance.
[0072] Determine the learning rate of the ANN model, and the corresponding calculation formula is:
[0073]
[0074] where, w t+1 represents the ANN model parameter at time step t + 1; wt denote the ANN model parameters at time step t; η denotes the learning rate; denote the gradients of the ANN model parameters; J denotes the loss function;
[0075] Set the learning rate of the ANN model to at least three ranges: 0.001, 0.01, and 0.1.
[0076] It is explained that the learning rate refers to the amount of model parameter update, that is, the learning rate determines the speed and direction of updating the weight parameters of the ANN model during training.
[0077] Furthermore, in step S3, the ANN model is trained based on the training set for different parameters, and the trained ANN model is combined with the model evaluation scores to construct the ML model, including:
[0078] Step S201: Set the number of iterations, and iteratively optimize the ANN model based on the training set for different parameters to complete the training of the ANN model.
[0079] Optionally, the range of the number of iterations is generally set between 500 - 2000 times, which represents the total number of rounds that all training data are trained; through multiple iterations, the model can gradually adjust its internal parameters to better adapt to the characteristics and laws of the data; that is, add a for loop in the neural network to facilitate automatic training to find the optimal prediction result; in this embodiment, the number of iterations is set to 1000 times; aiming to balance the training time and model performance, and ensure that the model reaches a high accuracy and generalization ability without overfitting.
[0080] Step S202: Input the training set into the trained ANN model, calculate several evaluation results through the model evaluation scores, determine the optimal model parameters based on the evaluation results, and construct the ML model through the optimal model parameters; the model evaluation scores are R 2 , MSE, MAE, MAPE.
[0081] It is explained that during the training process of the ANN model, a training result will be obtained for each change of a set of parameters. Therefore, to analyze this result, model evaluation scores are used for evaluation to analyze the accuracy of model training.
[0082] Specifically, R 2 denotes the regression model evaluation index, that is, the coefficient of determination or goodness of fit, and its value range is between [0, 1], which is used to describe the proportion of the dependent variable variance in the total variance in the ANN model. The corresponding calculation formula is as follows:
[0083]
[0084] where, n represents the number of data in the training set; yi represents the true value of the \(i\)th data; represents the predicted value of the \(i\)th data; represents the average value of the true values; \(R\) 2 The closer it is to 1, the better the fitting effect of the ANN model and the smaller the error.
[0085] MSE (Mean Squared Error), which is used to obtain the mean of the sum of squares of the errors between the fitting data and the corresponding sample points of the original data, is sensitive to data outliers. The smaller the value of MSE, the better the fitting effect of the ANN model. The corresponding calculation formula is as follows:
[0086]
[0087] MAE (Mean Absolute Error), which represents the average of the absolute errors between the predicted value and the true value, directly reflects the average level of the prediction error. The closer its value is to 0, the smaller the error between the actual value and the predicted value, that is, the smaller the average distance, and the more accurate the model. The corresponding calculation formula is:
[0088]
[0089] MAPE (Mean Absolute Percentage Error), whose range is \([0, +\infty)\). When MAPE is 0%, it represents a perfect model. When MAPE is greater than 100%, it represents a poor model. And in practical applications, the target actual value cannot be 0. The corresponding calculation formula is:
[0090]
[0091] It should be noted that the meanings of the parameters in the aforementioned MSE, MAE, and MAPE are the same as those of the parameters represented by \(R\) 2 Specifically, based on the aforementioned training set and combined with the model evaluation scores, multiple groups of evaluation results corresponding to the models are obtained. These results are compared using a programming language to screen out the group of results with the best evaluation scores, and the corresponding model parameters are output at the same time, as shown in the data in Table 1.
[0092] Table 1 Evaluation Scores of the Optimal ML Model
[0093] <![CDATA[R 2 > <![CDATA[MSE / eV 2 > MAE / eV MAPE Optimal ML Model 0.887 0.046 0.151 0.054
[0094] Preferably, in this embodiment, in the ML (Machine Learning) model constructed after training and optimization of the ANN (Artificial Neural Network) model, the optimal number of hidden layers output is (100, 100, 100); the activation function in the neuron is the ReLU function; the optimal learning rate is 0.01.
[0095] Please refer to Figure 2 , which shows a comparison schematic diagram of the prediction results and actual values of a method for predicting the optical band gap of borate glass based on a machine learning algorithm provided by an embodiment of the present invention; among them, the dotted line represents the function y = x, and the distribution of points represents the distribution of model prediction values. The closer the points are to the line, the more it indicates that the prediction value of the optimal ML model is equal to the experimental value; in addition, in a general research scenario, when 0.85 < R 2 <1, MSE < 0.05 eV 2 , MAE < 0.2 eV, MAPE < 0.1 can be regarded as a relatively perfect model in the actual scenario. Therefore, from Figure 2 and Table 1, it can be known that the prediction values of the optimal ML model established based on this embodiment are close to the actual values, indicating that the prediction effect and accuracy of this model both reach the expected effect, that is, the prediction accuracy is relatively high and the prediction results are relatively accurate.
[0096] Please refer to Figure 3 , which shows a schematic diagram of the linear relationship between the composition of borate glass and optical band gap data of a method for verifying predicted optical band gap data based on a machine learning algorithm provided by an embodiment of the present invention; a method for verifying predicted optical band gap data based on a machine learning algorithm provided by the second embodiment of the present invention is used to verify the correlation between the predicted optical band gap data obtained in a method for predicting the optical band gap of borate glass based on a machine learning algorithm as described in any one of the first embodiments of the present invention and the composition of borate glass. The method includes:
[0097] Step S11: Input the validation set into the optimal ML model for verification to judge the prediction effect of the optimal ML model;
[0098] Step S22: According to the database, calculate the Pearson correlation coefficient of the borate glass composition and optical band gap data, and perform importance ranking to analyze the relationship between the input data and the output data;
[0099] Step S33: Combine the prediction effect and analysis results to determine the correlation between the borate glass composition and the predicted optical band gap data.
[0100] Understandably, validating the prediction method can better corroborate the reliability of the optimal ML model for practical scenarios and improve its stability for unfamiliar datasets.
[0101] Furthermore, in step S11, it includes:
[0102] Input the validation set into the optimal ML model for validation, and observe the model evaluation scores of R 2 , MSE, MAE, and MAPE obtained after calculation by the optimal ML model. Set corresponding judgment conditions for any of the model evaluation scores, and determine the prediction effect of the optimal ML model according to the judgment conditions.
[0103] Specifically, use the validation set obtained in the aforementioned first embodiment for validation. Since the amount of data in the validation set is small, the model evaluation score R2 is 0.77; the values of MAE and MAPE are 0.3 and 0.176 respectively. Through these two data values, the prediction accuracy of the model can be intuitively judged, that is, the prediction accuracy of the model is preliminarily evaluated. According to the error range of the best ML model in the general scenario described above, although the evaluation score of this validation set exceeds the error range of the optimal model, the error deviation between the predicted value and the actual value is only 0.1, which is within the acceptable range, indicating that the prediction effect of the optimal ML model is good and it is suitable for the preliminary prediction of unfamiliar datasets.
[0104] Furthermore, in step S22, it includes:
[0105] Step S2201: Calculate the Pearson correlation coefficient of the borate glass composition and the optical bandgap data according to the database. The corresponding calculation formula is:
[0106]
[0107] where r represents the Pearson correlation coefficient; X represents the input data, that is, the borate glass composition in the database; Y represents the output data, that is, the optical bandgap data in the database; cov represents the covariance; σ represents the standard deviation;
[0108] Step S2202: Obtain the Pearson correlation coefficients of all borate glass compositions and optical bandgap data in the database, and sort them in descending order to obtain the linear correlation degree between the borate glass composition and the optical bandgap data.
[0109] It should be noted that the Pearson correlation coefficient is used to measure the linear relationship between feature variables and target variables, that is, the correlation between input data and output data, usually denoted as r, and its value ranges from [-1, 1]; specifically, after calculating the Pearson correlation coefficient of all borate glass compositions and optical band gap data based on the database, it is recorded as feature importance and sorted from large to small. The closer the correlation coefficient is to 1 or -1, the stronger the linear relationship between the feature variable and the target variable; the closer it is to 0, the weaker the linear relationship, so as to provide data support for judging the prediction effect of the optimal ML model.
[0110] Further, in step S33, it includes:
[0111] If the Pearson correlation coefficient is 1, it indicates the strongest correlation between the borate glass composition and the predicted optical band gap data;
[0112] If the Pearson correlation coefficient is 0, based on observing the prediction effect of the optimal ML model for one time, it is judged whether the currently analyzed borate glass composition has an impact on the predicted optical band gap data. If so, it indicates that there is a correlation between the borate glass composition and the predicted optical band gap data.
[0113] Optionally, in this embodiment, from Figure 3 it can be known that the correlation coefficient values of the four compounds Pr2O3, Y2O3, CuCl2, and Pb3O4 are all 1, indicating that the elements of these four borate glass compositions have the strongest correlation with the optical band gap data, and the compound composition ratio has the greatest impact on the prediction effect of the optical band gap; in addition, although the correlation coefficient values of the four compounds Gd2O3, AgI, ZnF2, and PbF2 are 0, it does not mean that these compounds are independent of the optical band gap and does not mean that these compound compositions have no impact on the prediction of the optical band gap. Therefore, in combination with the prediction effect in the one-time judgment, an explanation is made for this kind of compound. Based on the two prediction effects, it is known that the content of the borate glass composition has a certain impact on the prediction effect of the optical band gap; thus, the verification of the prediction method is completed.
[0114] An embodiment of the present invention also proposes a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in any one of the foregoing embodiments.
[0115] It should be noted that: the above sequence of embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0116] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments.
Claims
1. A method for predicting the optical band gap of borate glass based on a machine learning algorithm, characterized in that: The method comprises: Obtaining borate glass composition and optical band gap data, and performing preprocessing, and separating the preprocessed borate glass composition and optical band gap data to obtain a validation set; Building a database based on the data of non-validation sets in the pre-processed borate glass composition and optical band gap data, and generating a training set and a test set based on the database; Build an ANN model and define the parameter range of the ANN model. Train the ANN model with different parameters based on the training set. Combine the trained ANN model with the model evaluation score to build an ML model. The training set is input into the ML model to obtain the evaluation score, all the evaluation scores of the training set are compared to determine the optimal ML model, and the predicted optical band gap data is obtained based on the test set.
2. The method for predicting the optical band gap of borate glass based on a machine learning algorithm according to claim 1, characterized in that: Obtain borate glass composition and optical band gap data, perform preprocessing, and separate the preprocessed borate glass composition and optical band gap data to obtain a validation set, including: Collecting borate glass composition and optical band gap data from the international glass database, constructing a data database, and performing preprocessing based on the data database to obtain cleaned borate glass composition and optical band gap data; the preprocessing includes data cleaning methods such as eliminating outliers, filling in null values, data standardization, and normalization processing; The composition of the pre-treated borate glass is defined as input data, and the optical band gap data after pre-treatment is defined as output data. A validation set is obtained by screening based on the input data and the output data.
3. The method for predicting the optical band gap of borate glass based on a machine learning algorithm according to claim 1, characterized in that: Build an ANN model and define the parameter range of the ANN model, including: Construct the ANN model, and the corresponding calculation formula is: Where y represents the output data, i.e., the optical band gap data after preprocessing; f represents the activation function; n represents the total number of borate glass components after preprocessing; x i represents the input data, i.e. the composition of the i-th borate glass after preprocessing; w i represents the weight corresponding to the i-th borate glass component after pretreatment; b represents the bias parameter; The activation function includes any one of a ReLU function, a Sigmoid function and a Tanh function; the number of hidden layers in the ANN model is set to include at least three ranges: (100), (100,100), and (100,100,100); Determine the learning rate of the ANN model, the corresponding calculation formula is: Among them, w t+1 represents the ANN model parameters at time step t+1; w t represents the ANN model parameters at time step t; η represents the learning rate; represents the gradient of ANN model parameters; J represents the loss function; Set the learning rate of the ANN model to at least 0.001, 0.01, and 0.
1.
4. The method for predicting the optical band gap of borate glass based on a machine learning algorithm according to claim 3, characterized in that: The ANN model is trained based on different parameters of the training set. The trained ANN model is combined with the model evaluation score to build an ML model, including: Set the number of iterations, iteratively optimize the ANN model for different parameters based on the training set, and complete the training of the ANN model; The training set is input into the trained ANN model, and several evaluation results are obtained by calculating the model evaluation score. The optimal model parameters are determined based on the evaluation results, and the ML model is constructed by the optimal model parameters; the model evaluation score is R 2 , MSE, MAE, MAPE.
5. A method for verifying predicted optical bandgap data based on a machine learning algorithm, characterized in that: Used to verify the correlation between the predicted optical band gap data obtained in the borate glass optical band gap prediction method based on a machine learning algorithm as described in any one of claims 1 to 4 and the borate glass composition, the method comprising: Input the validation set into the optimal ML model for validation to determine the prediction effect of the optimal ML model; According to the database, the Pearson correlation coefficient of borate glass composition and optical band gap data is calculated, and the importance is ranked to analyze the relationship between input data and output data; The predicted effects and analytical results were combined to determine the correlation between the borate glass composition and the predicted optical bandgap data.
6. The method for verifying predicted optical bandgap data based on a machine learning algorithm according to claim 5, characterized in that: Input the validation set into the optimal ML model for validation and determine the prediction effect of the optimal ML model, including: The validation set is input into the optimal ML model for verification. The model evaluation scores of R2, MSE, MAE, and MAPE are obtained after calculation by the optimal ML model. The corresponding judgment conditions are set for any model evaluation score, and the prediction effect of the optimal ML model is determined according to the judgment conditions.
7. The method for verifying predicted optical bandgap data based on a machine learning algorithm according to claim 6, characterized in that: According to the database, the Pearson correlation coefficient of borate glass composition and optical band gap data is calculated, and the importance is ranked to analyze the relationship between input data and output data, including: According to the database, the Pearson correlation coefficient of borate glass composition and optical band gap data is calculated, and the corresponding calculation formula is: Where r represents the Pearson correlation coefficient; X represents the input data, i.e., the borate glass composition in the database; Y represents the output data, i.e., the optical band gap data in the database; cov represents the covariance; σ represents the standard deviation; The Pearson correlation coefficients of all borate glass compositions and optical band gap data in the database are obtained and sorted in descending order to obtain the linear correlation degree between borate glass compositions and optical band gap data.
8. The method for verifying predicted optical bandgap data based on a machine learning algorithm according to claim 7, characterized in that: The predicted results were combined with the analytical results to determine the correlation between the borate glass composition and the predicted optical bandgap data, including: If the Pearson correlation coefficient is 1, it means that the correlation between the borate glass composition and the predicted optical band gap data is the strongest; If the Pearson correlation coefficient is 0, the prediction effect of the optimal ML model is observed to determine whether the borate glass composition currently analyzed has an effect on the predicted optical band gap data. If so, it indicates that there is a correlation between the borate glass composition and the predicted optical band gap data.
9. A computer storage medium comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 or claims 5 to 8 are implemented.