Support Vector Machine Weather Prediction Technology Based on the Improved Quantum Optimization Algorithm

Emotion recognition is a research hotspot in the field of artificial intelligence. If the human-computer interaction system can sense human emotion and express emotion, it will make the interaction between the robot and human more natural. In this paper, a multimodal emotion recognition model based on many-objective optimization algorithm is proposed for the first time. The model integrates voice information and facial information and can simultaneously optimize the accuracy and uniformity of recognition. This paper compares the emotion recognition algorithm based on many-objective algorithm optimization with the single-modal emotion recognition model proposed in this paper and the ISMS_ALA model proposed by recent related research. The experimental results show that compared with the single-mode emotion recognition, the proposed model has a great improvement in each evaluation index. At the same time, the accuracy of emotion recognition is 2.88% higher than that of the ISMS_ALA model. The experimental results show that the many-objective optimization algorithm can effectively improve the performance of the multimodal emotion recognition model.


Introduction
It is worth mentioning that rainfall is the only input element source for the hydrologic cycle. However, excessive rainfall and the scarcity of it on Earth affect the tremendous flooding and severe drought that occur over short and long intervals [1]. erefore, rainfall forecasting can prevent many natural disasters, thereby saving human lives. e accuracy of rainfall forecasting can also help the preparation of efficient structural and nonstructural designs for disaster management. Weather forecast (measurement) [2][3][4][5][6][7] is to use modern science and technology to predict the state of the Earth's atmosphere at a certain place in the future. Since prehistory, human beings have begun to predict the weather to arrange their work and life accordingly (such as agricultural production and military operations). Today's weather forecast mainly uses the collection of a large number of data (temperature, humidity, wind direction and wind speed, air pressure, etc.), and then uses the current understanding of atmospheric processes (meteorology) to determine future air changes. Because of the disorder of atmospheric process and the fact that science does not know it thoroughly, there are always some errors in weather forecast.
Weather forecast can be divided into three types: shortterm weather forecast [8,9] (2-3 days), medium-term weather forecast (4-9 days), and long-term weather forecast [10,11] (more than 10-15 days). is study will focus on short-term weather forecast. According to the coverage area, the weather forecast can be divided into large-scale forecast (generally referring to the forecast of a continent or country), medium-scale forecast (usually referring to the forecast of a province (region), state, and region), and smallscale forecast (such as the forecast of a county, city, etc.). e medium-scale city forecast is carried out in this study. Research studies on hybrid techniques using data-driven models, such as artificial neural networks (ANNs), genetic programming (GP), and adaptive neurofuzzy inference systems (ANFISs), integrated with different optimization methods (e.g., particle swarm optimization (PSO), genetic algorithm (GA), and differential evolution (DE) algorithm) [12] have been published over the past decades and demonstrated positive outcomes for solving hydrology and water resource problems, such as rainfall runoff, river stage, evaporation, sediment, and groundwater. Abrahart et al. [13] used a pruning algorithm (PA) and a genetic algorithm (GA) to optimize data-driven models for runoff forecasting. Yaseen et al. [14] proposed the novel hybrid data-intelligence model for forecasting monthly rainfall with uncertainty analysis. Chau [15] applied a particle swarm optimization (PSO) algorithm to train ANNs for river stage prediction. He found that PSO could optimize the applied ANNs. In recent years, many new metaheuristics have been proposed. For example, Gai-Ge Wang proposed the moth search algorithm (MSA) [16] in 2018, and many researchers used the algorithm for optimization tasks in various fields. en, Wang et al. proposed monarch butterfly optimization (MBO) [17] in 2019. Ali Heidari et al. proposed Harris hawk optimization (HHO) [18] in 2019 and achieved good results. Li et al. proposed the slime mould algorithm (SMA) [19] in 2020 and achieved good optimization results. en, Moreno-Pineda et al. proposed the improved dragonfly algorithm (DA) [20]; the method can be used as a useful, auxiliary tool for solving complex optimization problems. Next, Yu et al. proposed a moth flame optimizer [21], which has achieved remarkable results in solving complex optimization problems.
Based on the above analysis, a new weather prediction model based on the improved quantum genetic algorithm (IQGA) [22] and support vector machines (SVMs) [23][24][25] is proposed to solve the problems in short-term and medium-range weather prediction. In real life, the prediction of weather forecast is a complicated process. It is difficult for people to find the rule and use it to predict the trend of future weather facing the complicated data. In this study, real weather data with 140,000 rows and 21 data features are collected from Kaggle (https://www.kaggle.com/jsphyg/ weather-dataset-rattle-package). Since the original dataset is collected and recorded by weather stations through rain radars and satellite images, the data must be analyzed and processed before establishing the weather prediction model. After dataset processing, SVM in machine learning algorithm is used to model, and QGA is used to optimize the parameters to maximize the efficiency of the model. ere are 21 features and 1 tag in 22 columns of data features. It is difficult to find the rules contained in the data through visual observation. However, SVM algorithm is very powerful; it can do data mining well to achieve better classification effect. However, one of its disadvantages is that it is greatly influenced by the parameters. Because many parameters will affect the efficiency of the algorithms at the same time, it is very inefficient to use traditional grid search, learning curve, and other parameter adjustment methods. It will take a lot of time and often cannot achieve the optimal classification effect. At this time, the efficiency and optimization advantages of quantum genetic algorithm can maximize the efficiency of the algorithms. e performance comparison between the model obtained by the original parameter adjustment method and the model optimized by the quantum genetic algorithm in the test set shows that the model optimized by the quantum genetic algorithm has a significant improvement in the prediction accuracy, AUC, and other test indicators. It is proved that the method is effective for determining optimization parameters and improving machine learning efficiency. e improved quantum genetic algorithm can be applied to the parameter optimization of other machine learning algorithms to increase the calculation efficiency and the optimization accuracy. It can also be used in various optimization problems to improve the search efficiency.

Related Technology Introduction
2.1. Preprocessing of Weather Data. As far as the current social development is concerned, we are all in the background of big data, and we cannot live without the influence of the data system. In the fierce competition process of all walks of life, the results of data mining often affect the decision-making direction of the whole project and then affect the final implementation and development results. It can be seen that data mining has become the focus of attention, and the data preprocessing which plays an important role in the process of data mining has also been further studied and found. Data preprocessing [26,27] is the first and most important step in data mining in this study, and we must ensure the accuracy and validity of weather data at the beginning of data mining. Only by doing a good job of data preprocessing and further improving the quality of data contained in the database can we fundamentally mine valuable data and improve the generalization ability of the model. e complex high-dimensional dataset used in this study includes the daily weather forecast of many Australian meteorological stations in 10 years. ere are about 140,000 pieces of data points, each of which has 22 characteristics, 21 columns are characteristic matrices (including time, place, maximum temperature of the day, rainfall, and wind speed), and the last column is tag (indicating whether it will rain tomorrow). In order to forecast the weather, we need to build the model forecast tag in the 21-column feature. e feature matrix of the dataset is composed of a part of classified variables and a part of continuous variables. For example, although the degree of cloud cover is expressed by numbers, it is a classified variable in essence. Most of the features are collected natural data, such as evaporation, sunshine time, and humidity, while a few of the features are composed of humans. ere are also variables that simply represent sample information, such as the location and time of collection.
In the data preprocessing of this study, we will divide the training set and the test set first and then start the data preprocessing. is is because the test set is often impossible to get in advance in reality, and we do not want any process of our modeling to be affected by the test set data; otherwise, it is equivalent to telling part of the predicted answers of the model in advance. In this study, all operations we performed on the training set must be performed on the test set once.
After obtaining the complex real weather dataset, we first observe the composition of the dataset as shown in Table 1 and then separate the training set and the test set, as well as the features and tag.
By observing the aforementioned dataset, we can find that there are a lot of empty data in the dataset, and there is also a case of dimensional inconsistency. At the same time, the data are composed of classification variables and continuous variables which need our data processing.
In this study, we first process the characteristics of the data. By observing the data, we can know that all data include 21 characteristics: time, place, temperature, humidity, cloud cover, rainfall, etc. ey also include our tag: whether it will rain tomorrow. rough data visualization [28,29] ( Figure 1 (year rainfall trend chart), Figure 2 (monthly rainfall trend chart), and Figure 3 (location rainfall trend chart)), we can find that time, location, and other characteristics will affect our tag.
rough data visualization, we can intuitively find that the year has little impact on the tag, but it will increase the complexity of the data, but the month will have a great impact on the tag, and the location has a very obvious impact on the tag. In this way, these data can help the model to make a better and more accurate judgment on the label. So, we cannot delete it directly; we need to deal with it. e following ingenious processing of weather data is made in this study.
(1) e month in time is extracted; because through data visualization analysis and common sense, we can know that the month will affect the probability of rain. (2) Does the day in time affect the tag? On the surface, it may not have any effect, but if it rains today, will the probability of rain tomorrow increase? inking of this, We have added new features to the dataset about whether it is raining today. We can set the threshold value by using today's precipitation. In this study, we set rainfall greater than 1 mm as today's rain and set the rest as no rain. After treatment, we add a new feature of whether it rains today. (3) We know that the climate corresponding to the location will affect our tag, so this study cleverly corresponds the location to the local climate, and we found the Australian land as shown in Figure 4 on Google.
is is produced by the Australian Meteorological Agency and the Australian Building Code Board (ABCB), which divides the climate regions of different cities in different regions of Australia. e distribution map is divided into eight regions, which is very suitable for us to classify. If we can transform 49 locations into eight different climates, this information should be useful for judging whether it rains or not. Based on the data of the Meteorological Bureau and ABCB, we have made the corresponding climate-type data of the main cities in Australia and saved them in the csv-1 file, but we found that the location in the original weather dataset does not represent the city but the name of the weather station. We need to convert the name of the weather station in the dataset into the name of the city. We use the shortest direct distance between two points to convert. Next, we do a web crawler [30,31] on Google to get the longitude and latitude of each city and save them in data csv-2. Next, we get the latitude and longitude corresponding to all weather stations in the dataset through the web crawler and save them in the csv-3 file. Next, we calculate the distance from the weather station to each city, find the city closest to the nearest weather station, and convert the location in the dataset into the city name closest to it. In this way, we can successfully convert the name of the climate station into the city name, and then we can use the csv-1 climate file to successfully convert each city name into the corresponding climate.
After finishing the above processing, we will fill in the missing value, code the type variable, and make the continuous variable dimensionless. Since our eigenmatrix is composed of two types of data, type and continuous, we must adopt different strategies to fill the missing values. In this study, if the feature is classified, we use mode to fill. If the feature is continuous, we use mean to fill. At this time, because we have divided the training set and the test set, because our test set may not be many pieces of data in reality, may be our test set has only one piece of data, and a certain feature is null, at this time, the mode of the test set itself does not exist, so in order to avoid this situation, we usually assume that the data distribution and properties of the test set and training set are similar, so we use the mode and mean of the training set to fill the test set. e normalization method is used in the dimensionless treatment of continuous variables.
After completing the above operations, our data preprocessing work is finished completely, and then we start to model.

Improved Quantum Genetic Algorithm.
Quantum genetic algorithm (QGA) [32][33][34] is a new developed probability optimization method based on the concept and theory of quantum computing in recent years. Compared with the classical genetic algorithm, QGA has great differences in many aspects. e chromosome of quantum genetic algorithm is not represented by a definite value (such as binary number, floating-point number, or symbol), but by qubit or random probability. Correspondingly, the state of the chromosome is not a definite state, but a superposition state. e main way of chromosome evolution of quantum genetic algorithm is not the selection, crossover, and mutation of genetic algorithm, but the quantum. In addition, the crossover and mutation operations introduced in quantum genetic algorithm are different from the crossover and mutation of genetic algorithm in the way of implementation. ese ingenious designs make quantum genetic algorithm have better population diversity and parallel computing ability.

Quantum Bit Coding.
e smallest information unit in QGA is represented by qubits. A qubit can not only represent two states of 0 and 1 but also represent any superposition state between them. erefore, the state of a qubit can be expressed as φ i � α i |0〉 + β i |1〉, where α and β are probability amplitudes of 0 and 1, respectively, and the following normalization conditions are met: |α| 2 + |β| 2 � 1, |α| 2 represents the probability that the observed value of the  quantum state is 0, and |β| 2 represents the probability that the observed value of the quantum state is 1. erefore, a qubit can store and express information of two states at the same time. A qubit string with a length of N can store and express 2 n different solutions at the same time.
e encoded chromosomes are as follows: where p t j is the chromosome of the j th individual of the t generation and m is the quantum bit number of chromosomes.

Quantum.
e evolution of quantum genetic algorithm is to use the quantum gate to rotate the quantum state, which is another significant difference from classical genetic algorithm. e transformation of the quantum logic gate is unitary transformation in the Hilbert space, which can ensure that the superposition state after change still meets the normalization condition.
In the quantum genetic algorithm, the quantum rotating gate [35] is used to update the individuals in the population. e matrix expression is as follows: where θ is the angle of rotation. For any quantum superposition state φ i � α i |0〉 + β i |1〉, the update operation is expressed as follows: e rules for θ i are as follows: Among them, (α i , β i ) represents the probability amplitude of the ith qubit of the chromosome. S(α i , β i ) and Δθ i are the rotation direction and rotation angle, respectively, which are selected according to the predetermined adjustment strategy. Figure 5 is the diagram of rotation variation. Under the guidance of the i position of the optimal solution chromosome, the current solution chromosome rotates clockwise to increase α t i to α t+1 i and decrease β t i to β t+1 i . It evolves in the optimal direction after rotation variation. e change of the amplitude changes the probability of each basic state obtained after measurement while maintaining the diversity of the population. e initial population will gradually deflect to the species with higher adaptability after the quantum rotation gate operation and finally converge to the optimal population to find the optimal solution of the problem.

Improved Quantum Genetic Algorithm.
In this paper, the traditional quantum genetic algorithm is improved in three aspects, and an improved quantum genetic algorithm is proposed. Next, three improvements are introduced.
(1) Improvement of the quantum population initialization adjustment strategy: quantum genetic algorithm uses the quantum superposition state to represent individuals in the population. erefore, compared with the classical genetic algorithm, it maintains the same population diversity and greatly reduces the population size. In general, the population initialization of quantum genetic algorithm uses formulas to encode individuals, and each gene collapses to |0〉 and |1〉 with equal probability which can ensure that the initial population is randomly distributed in the global solution space. However, this may cause that a local solution space is not searched or falls into the local optimal solution, and the purpose of optimization cannot be completed quickly.
In order to make the initial population more evenly spread over the whole solution space, the initial population can be initialized by grouping. When the traditional quantum genetic algorithm uses the formula to encode the quantum state, the parameter θ belongs to the interval [0, 2π], that is, the quantum state can be located anywhere on the unit circle in the two-dimensional space, and finally converges to one point of ±||0〉 or ±|1〉 through the action of multiple quantum rotation gates. erefore, in this study, the initial population is divided into five subpopulations, and the population initialization rules are as follows: where Angle is the initialization angle of the current population, p s is the population size, and c p represents the currently initializing individual label. e above formula divides the initial population into five parts so that the initial population can spread over the whole solution space. π/2 is selected for the initialization of multiple groups of population in the appeal formula but not for the division of the 2π interval because if the 2π interval is divided, it is possible to make the initialized population fall on a certain coordinate axis, resulting in the amplitude of the basic state |0〉 or |1〉 being 0. us, the final observation result is a certain value which does not meet the randomness condition.
is initialization method can make the initial population spread over the whole solution space and avoid the disadvantage that the probability amplitude of the quantum basic state is too average which may result in the measurement results concentrated in a certain interval. It can search from multiple local solution spaces at the same time, ensure the diversity of chromosomes, and improve the convergence rate of the algorithm.
(2) Improvement of the rotation angle adjustment strategy: the core of quantum genetic algorithm is the operation of update evolution which uses quantum rotation gate to rotate the quantum state at a certain angle. Premature convergence may occur when the rotation angle is too small; the convergence rate is too slow when the rotation angle is too large. erefore, how to choose the rotation angle of the quantum rotary gate will directly affect whether the quantum genetic algorithm can find the optimal solution quickly and effectively. However, the rotation angle of the quantum rotation gate selected by the update strategy is usually fixed in the standard quantum genetic algorithm, or the evolution operation is completed according to the update strategy table.
e two rotation angles are relatively fixed, which makes the algorithm not flexible enough to play the best performance of the quantum genetic algorithm.
Our improved quantum genetic algorithm uses a dynamic adjustment method for the rotation angle of the quantum rotation gate. When the current number of iterations is small, it indicates that there is still a large optimization space for the current quantum individual as a whole, and large angle rotation is required to achieve faster convergence. When the current number of iterations is -1 Figure 5: Diagram of rotation variation. 6 Computational Intelligence and Neuroscience closer to the maximum number of iterations, it shows that the whole quantum individual has become more and more excellent, so we only need to gradually reduce the rotation angle to find the best individual. e dynamic adjustment strategy for the rotation angle θ new is as follows: Among them, θ max is the maximum value of the set rotation angle. iter sum is the maximum number of iterations set. iter cur is the number of iterations currently carried out. is adjustment method can associate the rotation angle with the number of iterations and dynamically adjust the rotation angle, so as to improve the convergence rate of the whole body. It can also make the current individuals to be updated always and rotate faster towards the better individuals so that the algorithm can converge to the optimal solution faster. e quantum rotation gate strategy is shown in Table 2.
(3) Selection strategy improvement: the new mechanism of probability selection is adopted to abandon the traditional strategy of keeping excellent individuals and discarding individuals with low adaptability, and the probability of being selected can be determined flexibly according to the size of individual adaptability, which not only ensures the population richness but also effectively optimizes the algorithm into the local optimal solution, and each selection makes the algorithm move towards a good evolutionary direction. e specific implementation form is as follows: where p is the current individual retention probability, f value is the current individual fitness value, and sum value is the total individual fitness value of the population. e strategy ensures that no matter whether the individual is good or bad, there is a chance to keep it. At the same time, the higher the fitness, the greater the probability of keeping it, so the algorithm can optimize the population every time.

Support Vector
Machine. Support vector machine [36][37][38] (SVM, also known as support vector network) is the most concerned algorithm in machine learning. It comes from statistical learning theory. From the practical application, SVM is very good in all kinds of practical problems. It is widely used in handwritten digit recognition and face recognition and plays an important role in text and hypertext classification because SVM can greatly reduce the needs of standard inductive and transductive settings for marker training examples. At the same time, SVM is also used to perform image classification and image segmentation system. Experimental results show that, after only three or four rounds of correlation feedback, SVM can achieve much higher search accuracy than the traditional query refinement schemes. In addition, biology and many other sciences are the favourites of the SVM. SVM has been widely used in protein classification, and the industry average level of the compound classification can reach more than 90% accuracy. In the cutting-edge research of biological science, support vector machine is also used to identify various features used for model prediction, so as to find out the influencing factors of various gene expression results. From the academic point of view, SVM is a machine learning algorithm close to deep learning. Linear SVM can be regarded as a single neuron of neural network (although loss function is different from the neural network), while nonlinear SVM is equivalent to a two-layer neural network. If multiple kernel functions are added to the nonlinear SVM, multilayer neural network can be imitated. SVM is developed from the optimal classification surface in the case of linear separability. e basic idea of the SVM is to map the input vector to a high-dimensional feature space through a preselected nonlinear mapping and turn the required nonlinear problem into a linear separable problem in the high-dimensional space. In this high-dimensional space, an optimal linear classification surface is constructed which can separate the two types. Moreover, the classification interval between the two categories is maximized.
Set the sample set to (x i , y i ), (i � 1, 2.., n). x ∈ R d , y ∈ +1, −1 { }, and meet the conditions: en, (w, b) defines a hyperplane, and the classification interval is equal to 2/‖w‖ 2 . Make the maximum interval equal to the minimum 1/2‖w‖ 2 , and satisfy constraint condition formula equation (8), which embodies the idea of the SVM maximum interval. e Lagrange function is constructed: e partial differentiation of w and b is obtained, respectively. e original problem is transformed into a dual problem: After solving a, we use the weight vector W 0 (W 0 � n i x i y i a i (i ∈ support vector)) and b 0 to determine the optimal hyperplane: Table 2: New quantum rotation gate strategy.
Computational Intelligence and Neuroscience 7 For the nonlinear classification, the kernel function K(x i , x j ) can be used to transform formula equation (10) into n j�1 a i a j y i y j K x i , x j . (12) en, the corresponding classification function is Considering that some samples may not be classified correctly, in order to ensure the correctness of classification, the relaxation factor ξ i ≥ 0(i � 1, 2, · · ·, n) is introduced, and constraint equation (8) becomes e optimization objective function becomes where C is a specified constant, which is called error penalty factor. It plays a role in controlling the degree of penalty for wrong samples and achieves a compromise between the proportion of wrong samples and the complexity of the algorithm. At present, there are four kinds of kernel functions that are widely used: (i) Linear kernel: (ii) Poly kernel: (iii) RBF kernel: (iv) Sigmoid kernel: An important step is to select kernel function and kernel parameter when the SVM is used in weather forecast. Vapnik et al. found that different kernel functions have little effect on the SVM performance, but the parameters of kernel function and error penalty factor C are the key factors affecting the SVM performance. It is very important for the performance of learning machine to choose a proper kernel parameter and error penalty factor C. At present, there is not a scientific theory to solve the optimization problem of SVM classifier model parameters. It is still in the stage of repeated experiments trying to choose the optimal kernel function and related parameters for the experimental results. erefore, in order to improve the recognition rate and speed, this paper tests the performance of the above four kernel functions on the weather dataset at the same time in order to find the optimal model.

IQGA-SVM Model
Support vector machines have good generalization ability. ey can solve the problems of small sample and nonlinearity and overcome the shortcomings of traditional methods, such as dimension disaster and overlearning. However, there are many aspects that affect the recognition accuracy of the SVM including the selection of kernel function which is not only often related to human experience but also to sample data. It is impossible for human experience to be effective for all sample data. ere are many optimization methods for parameter variables in practical problems, among which search algorithm is widely used. It searches for the whole parameter variable space. It is necessary to select an effective search algorithm to obtain the optimal parameters considering the large parameter space and the limited calculation time. Aiming at the weather prediction system studied in this paper, the parameter optimization of the traditional SVM classification model has reached the goal of improving the classification accuracy. Based on this, the IQGA-SVM classification model is constructed. e optimization ability of the improved quantum genetic algorithm is discussed in the following. e quantum genetic algorithm starts from the initial population which is composed of the whole solution space with average distribution to search in the parameter space. e individual state is represented by the quantum bit probability amplitude, which enhances the diversity of the population and expands the optimization ability. Individuals with higher adaptability are selected for population renewal through the selection operation in genetic operation. Population renewal is carried out through the quantum rotation gate. Population renewal means that there are always new individual transformations which not only enhance the population diversity but also expand the scope of search and can obtain the global optimal solution better than genetic algorithm. Quantum genetic algorithm only needs to calculate the fitness value. erefore, it is convenient to connect the SVM as an intermediate variable for parameter optimization.
IQGA-SVM algorithm flow is as follows: (i) First, a predesigned angle sequence is generated by initialization. en, it is transformed into a population of n individuals P(t)(P(t) � (p t 1 , p t 2 , . . . , p t n )), where p t j (j � 1, 2, . . . , n) is an individual of generation t in the population. (ii) Construct R(t) � (a t 1 , a t 2 , . . . , a t n ) according to the value of the probability amplitude in P(t), where a t j (j � 1, 2, . . . , n) is a binary of string.

Computational Intelligence and Neuroscience
(iii) Use the fitness function to calculate each individual in R(T). Next, use the following selection strategy. e fitness is used to determine the probability that the individual is left behind, so as to ensure that each individual can have the probability corresponding to the fitness and keep it. is method can not only keep the population rich and avoid falling into the local optimal solution but also make the whole population converge in a better direction. (iv) Judge whether the specified precision termination condition is triggered. If not, continue the following operations. If the condition is met, output the optimal parameter and construct the optimal parameter model. (v) According to the number of iterations, the rotation angle of the quantum rotation gate is changed dynamically. (vi) Determine whether the set upper limit of iteration times is reached. If the upper limit is reached, output the optimal parameters, and construct the optimal parameter model. e algorithm flow of the weather prediction model based on IQGA-SVM is shown in Figure 6.

Simulation
In order to verify the feasibility of the model, the partial random sampling of the weather dataset is carried out, and the simulation experiment is carried out on software Jupyter Notebook, and Python 3.7 version is used for testing. In order to reduce the search range of the improved quantum genetic algorithm, the general range of the parameters to be adjusted is determined by the traditional learning curve of parameter adjustment. We found that the tag of the weather dataset has the problem of sample imbalance after data exploration. e proportion of rainy weather and nonrainy weather is about 3 : 1, so we need to add a class weight balance parameter when building the model. As shown in Figures 7 and 8, Parameters C and class_Weignt have great influence on the performance of the algorithm.
rough observation, it can be found that, for IQGA-SVM, the model of the weather forecast dataset in this study, the penalty coefficient C is better in [0, 3], and the sample unbalanced parameter class weight is the best in [0. 5,2]. rough the exploration of different parameter ranges of the four kernel functions by the learning curve and grid search method, the final parameters and ranges to be found are shown in Table 3. After a lot of experiments, the parameter settings of the improved quantum genetic algorithm are shown in Table 3.
After determining the range of the parameters to be searched, the improved quantum genetic algorithm is used to optimize the parameters of the four kernel functions, respectively, and the optimization effect is shown in Figure 9.
rough the analysis of Figure 9, it can be concluded that the prediction effect of the linear kernel function and poly kernel function on the weather dataset used in this study is the best. Among them, the highest prediction accuracy of the model using the poly kernel function is 87.33%, and the highest prediction accuracy of the model using the linear kernel function is 87%. Moreover, the improved quantum genetic algorithm can find the optimal parameter value for the model in a few iterations. e effect of the rbf kernel function is slightly lower than the former two, and its highest  Computational Intelligence and Neuroscience accuracy is 85.3%. e performance of the sigmoid kernel function is the worst. e highest prediction accuracy is only 81.3%. erefore, it can be seen that this weather dataset is a partial linear dataset through analysis. e optimal parameter list determined by improving the optimization of quantum genetic algorithm is shown in Table 4.
Next, IQGA-SVM model (poly kernel function), support vector machine model based on genetic algorithm (GA-SVM), and support vector machine model based on improved ant colony optimization (ICMPACO-SVM) [39] are tested for 30 times, respectively, and compared with other machine learning models. e results are shown in Figure 10. e performance comparison results of each algorithm are shown in Table 5. As can be seen from Table 5, the prediction accuracy of the SVM is better than that of linear regression, decision tree, and random forest and slightly lower than that of XGBoost. Genetic algorithm effectively improves the prediction accuracy of the SVM and surpasses other traditional machine learning algorithms. Quantum genetic algorithm is better than genetic algorithm but lower than ICMPACO-SVM and IQGA-SVM. e prediction rate of the model optimized by ICMPACO algorithm is 87.1%, second only to IQGA-SVM. e average accuracy, optimal accuracy, and AUC of the IQGA-SVM model are the highest, and the interpretability is also enhanced. At the same time, we also find that IQGA-SVM can converge to a better solution in a very short time, but at the end of the iteration, the search scope will gradually become smaller and occasionally fall into the local optimal solution. e ROC curve of the optimal IQGA-SVM model is shown in Figure 11.
Next, we introduce the parameter setting of several other parameter searching algorithms:      e IQGA-SVM is compared with the commonly used parameter adjustment methods to verify its advantages in accuracy and efficiency. Grid search is the most commonly used method of parameter adjustment in the industry. Its idea is exhaustive search, traversing all the candidate parameters to find the best value of the parameters to be selected. Its disadvantage is that it takes a long time and can only be selected in the given candidate set. Random walk is a global optimization algorithm. According to the law of large numbers, as long as the random number is enough, the optimal or near-optimal parameters can always be found. Its disadvantage is that it highly depends on the initial value, and the random results may be inconsistent. e idea of quantum genetic algorithm is the survival of the fittest. Keep some excellent individuals in each iteration, and there is a certain probability of crossover and mutation, resulting in new samples. erefore, quantum genetic algorithm is also a global optimization algorithm. When the mutation probability is large, quantum genetic algorithm will degenerate into random walk. IQGA-SVM, QGA-SVM, GA-SVM, grid search, and random walk were used to adjust parameters for 30 times, respectively. e comparison results are shown in Table 6. e order of parameter list is C, c, coef0, degree, and class_weight. Table 5 uses average accuracy, optimal accuracy, and running time as evaluation indexes. From Table 5, it can be found that grid search accuracy is low and extremely time consuming. Random walk accuracy and running time are in    Computational Intelligence and Neuroscience the middle. e running time of GA-SVM is the least, and its precision is second only to QGA-SVM. e running time of ICMPACO is longer than that of random walk, but its precision is second only to IQGA. IQGA has the best prediction accuracy, and the time is slightly higher than GA-SVM and QGA-SVM.
e experimental results show that IQGA-SVM is better than linear regression and random forest algorithm in prediction accuracy. It is better than grid search and random walk in running time and parameter adjustment. Compared with the GA-SVM algorithm, IQGA-SVM can improve the prediction accuracy at a sacrifice of a small amount of time.

Conclusion
In this paper, the real complex weather dataset is selected as the experimental data through ingenious data preprocessing to enhance the potential of data mining. en, the traditional quantum genetic algorithm is improved from several directions which effectively enhances the global search ability and efficiency of the quantum genetic algorithm. Next, the effects of IQGA-SVM, QGA-SVM, GA-SVM, and other classical machine learning algorithms on the dataset are compared. At the same time, IQGA-SVM is compared with grid search, random walk, QGA-SVM, and GA-SVM model in a variety of evaluation indicators. e advantages of the improved quantum genetic algorithm in parameter optimization are verified from several aspects. e experiment shows that the model of support vector machine based on the improved quantum genetic algorithm established in this paper has the optimal prediction effect. rough data analysis, the improved quantum genetic algorithm effectively improves the performance of the classifier and the accuracy of the weather prediction system by optimizing parameters. At the same time, we also find that the search range of IQGA-SVM will gradually decrease in the late iteration and occasionally fall into the local optimal solution. is leads to poor optimization effect. Our analysis shows that it may be because a large number of individuals are concentrated in the local optimal solution and cannot jump out at the end of the iteration. In the next study, we will consider adding the dynamic catastrophe strategy to solve this problem and further improve the optimization effect.
is study has good academic research and engineering application value. e main contribution of this paper is to propose a new parameter optimization method. In the next research, we will further optimize the effect of quantum genetic algorithm. At the same time, it is combined with more machine learning algorithms to increase its scalability.
It can improve the efficiency and accuracy of optimization by using the parallelism and good global search ability of quantum algorithm. It can also be applied to the weight and bias optimization of the neural network, so as to improve the learning ability of the neural network.
Data Availability e data used in this article are available at https://www. kaggle.com/jsphyg/weather-dataset-rattle-package.

Conflicts of Interest
e authors declare that they have no conflicts of interest.