# Prediction of Urban Scale Expansion Based on Genetic Algorithm Optimized Neural Network Model

Authors: Hewu Kuang
Journal: Journal of Function Spaces
 (2022)

---

## Abstract

With the continuous development of urbanization, the urban population is becoming more and more dense, and the demand for land is becoming more and more tense. Urban expansion has become an indispensable part of urban development. This paper studies the optimization of neural network structure by genetic algorithm, puts forward the prediction model of urban scale expansion based on a genetic algorithm optimization neural network, and compares the performance of the model with the basic model. A genetic algorithm BP neural network (GA-BP) optimized by the genetic algorithm is used to shorten the running time of the algorithm and improve the prediction accuracy, but it is easy to fall into local solution. The genetic algorithm is improved by immune cloning algorithm, and the CGA-BP neural network model is established to obtain the global optimal solution. Compared with the BP neural network model and GA-BP neural network model, the CGA-BP neural network model converges faster, and the training times reach the error condition after 79 times, while the BP neural network model and GA-BP neural network model need 117 times and 100 times, respectively, and the fitness value corresponding to the number of iterations of the model is larger. Therefore, the CGA-BP neural network algorithm can make prediction more accurately and quickly and predict the expansion of urban scale through urban conditions.


---

## Body

## 1. Introduction

Urban spatial expansion is the most direct manifestation of urban land use change. Urban spatial expansion is a comprehensive reflection of the changes of spatial layout and structure in the process of urbanization. With the advancement of global urbanization, urban spatial expansion has become a hot field in urban development research at home and abroad. The rapid development of urbanization in China has brought the unprecedented characteristics of urbanization. The continuous expansion and disorderly spread of cities in space have brought a series of problems. The contradiction between supply and demand of urban land is becoming more and more acute, which has become one of the main challenges that China will face now and in the next decade. Under the background that the concept of urban space management has been widely recognized, the rational and orderly expansion of urban space has more strategic significance in China. Therefore, the research on the simulation and prediction of urban spatial expansion has important and urgent social and economic needs.With the development of urbanization, urban expansion has become an inevitable trend. Predicting its scale is conducive to the direction of social development and the proportion of economic investment [1]. A neural network model is one of the common prediction means. The neural network has the characteristics of direct input to direct output. It adjusts its parameters to make the output results meet the conditions. Its high accuracy is one of the necessary conditions for prediction [2]. The genetic algorithm is to make up for the defect of neural network falling into local solution. The common genetic algorithms are the niche genetic algorithm and immune clonal genetic algorithm. The niche genetic algorithm is to preserve the population, reduce the fitness of the population, increase the probability of elimination, and increase the diversity of the population. It is a more accurate model [3]. The research is using the genetic algorithm to optimize the model constructed by the neural network, which is more accurate and scientific for prediction. In order to reduce the redundant connection and unnecessary computational cost of neural network, quantum immune cloning algorithm is applied to the optimization process of neural network. The neural network structure is optimized by generating weights with sparsity. The algorithm can effectively delete the redundant connections and hidden nodes in the neural network and improve the learning efficiency, function approximation accuracy, and generalization ability of the neural network at the same time.Immune clonal genetic algorithm is used to optimize neural network. Immune clonal genetic algorithm essentially adopts proportional replication operator and proportional mutation operator. Select the antibody with the highest affinity before antigen and antibody for replication, get a new set, and generate the global optimal antibody through high mutation probability. This makes the immune clonal algorithm obtain the optimal solution quickly on the basis of maintaining the diversity of the population, which is the advantage of the model, such as more adaptability and efficiency.The innovation of this research is to solve the defect that the neural network model is easy to fall into the local optimal solution by combining the characteristics of introducing new species and increasing species and group diversity into the genetic algorithm. The urbanization expansion is gradually mature this year. In this field, the prediction is made by combining the genetic algorithm and neural network for the first time, and the nonlinear function characteristics of the neural network are used to make the prediction of urban expansion more accurate and provide a scientific basis for urban development.The research is mainly divided into four parts. Section2 mainly analyzes and summarizes the current application and effect of the genetic algorithm and neural network. Section 3 introduces the factors affecting the development of urban scale and constructs the prediction model of the genetic algorithm optimization neural network. Section 4 analyzes and compares the new capabilities of the optimization model and the traditional model. Section 5 evaluates the analysis and research results and puts forward the deficiencies in the research.


## 2. Related Work

Dawid’s team applied the genetic algorithm to the spider web model and explained the results of different settings by simulating different coding schemes and fitness functions with state dependence. It found the relationship between the coding and convergence attributes of the genetic algorithm, the adaptability of the genetic algorithm in the economic system and the learning behavior of bounded rational groups [4]. Researchers such as Domashova et al. proposed a genetic algorithm to build the best framework of multilayer perceptron, create a random population, confirm the selection method of fitness function and parent sample selection, and propose the modification of crossover and mutation operators to ensure the operability of the algorithm for large and small individuals and solve the classification problem with minimal error [5]. Shukla and other scholars use the model established by the convolutional neural network to diagnose COVID-19 patients with chest X-ray images and use the multiobjective genetic algorithm to adjust the recognition parameters. The experiment shows that 20x cross-validation can overcome the overfitting dilemma, and the recognition of the COVID-19 model has achieved obvious results, providing technical support for the process of diagnosis and screening of diseases [6]. Feng and other researchers proposed a network structure based on genetic algorithm, which generates a basic model dominated by an integrated algorithm by adjusting parameters and takes the original personal identification data as the numerical value. The results show that the prediction accuracy of the integrated model is better than the basic model, making personal identification occupy an important position in biological feature recognition [7]. Nikbakht’s team applied the genetic algorithm to the neural network to find the optimal solution and optimized the hidden layer, integration point, and neuron number of each layer to achieve the highest accuracy, so as to predict the stress distribution of the structure. The results show that the prediction accuracy of the neural network has been significantly improved after the optimization of the genetic algorithm [8]. Han and other researchers used the genetic algorithm to optimize the BP neural network and build a GA-BP hybrid model. 13 of the 16 selected product design schemes were added to the hybrid model as parameters. After training, the predicted and actual values were obtained. Finally, the remaining schemes were verified. The results showed that the errors of several groups of data were 3.4%, 9%, and 3.1%, reflecting that the hybrid GA-BP model can predict the design scheme quickly, conveniently and accurately [9]. Ni’s team proposed a router optimization algorithm based on the genetic ant colony algorithm in an IPv6 environment. The algorithm integrates genetic algorithm and ant colony algorithm, rewards or punishes by comparing the smoothness of the search path and the best path, and trains the obtained optimal solution. Experimental results show that the algorithm effectively solves the network quality problem and improves the service quality to users [10].Researchers such as Gamidi and Ke proposed an artificial neural network model to predict the properties of eutectic based only on pure component physical properties. In the model grouping, the proportion of training model and test model is 7 : 3. When the training stops, the total value is higher than 0.986. The corresponding dissolution properties of eutectic and ideal solubility of eutectic are successfully predicted [11]. Zhang and other scholars combined PM2 5. The prediction model based on the Bi-LSTM neural network is constructed based on the concentration and meteorological information data. The meteorological characteristics are introduced and compared with the neural network model based on Gru. The results show that the model is effective for PM2 5. The prediction error of the concentration is smaller [12]. Pattnaik’s team developed a prediction model based on the artificial neural network and Taguchi to predict the response. By using a lower level Taguchi orthogonal array to conduct a small number of experiments in the process of wire laying out, the results show that the modified model can predict the response more accurately [13]. Kenanoğlu and other researchers established an artificial neural network model by using LM learning algorithm to adjust the weight in the forward network. The results show that the model has high-precision prediction of motor torque, motor power, and emissions and plays an important role in promoting low-carbon emissions [14]. Abuelezz’s team proposed a model for predicting the vertical total electron content of the upper ionosphere based on neural network and compared it with the IRI2016 model. The results show that the IRI2016 model is inferior to this model in all cases [15]. Chen and other researchers established a film scoring prediction model based on the convolutional neural network. Through experiments, it is found that the performance of a ten-layer convolutional neural network is the best, and the accuracy is about 56%, and the predicted value is close to the actual value, which provides a new model for film scoring prediction [16]. Gade’s team proposed a Newmark sliding displacement prediction model based on the neural network. The mixed effect algorithm was used to evaluate the event residual. It was found that the model had no deviation and was consistent with the observed displacement characteristics, proving the applicability of the model and effectively predicting the seismic slope displacement hazard [17]. Ma and other researchers put forward a network state prediction algorithm of intelligent production line, which calculates and predicts the operation of the network through the optimized BP neural network. The results show that the optimal data prediction cycle is obtained in a large number of network data prediction experiments, and the accuracy is more than 90%, which is of great significance to improve the quality of network communication [18].Based on the above analysis, genetic algorithm and neural network structure play an important role in classification, screening, and prediction, improve the accuracy of results, and promote the development of various fields. However, the relevant algorithms are rarely used in urban scale expansion, and the model provides a new scientific basis for urban scale expansion prediction.


## 3. Application of CGA-BP Neural Network in Urban Scale Expansion Model

### 3.1. Prediction of Urban Scale Expansion and Construction of Neural Network

Urban construction land is directly related to the rational layout and optimal utilization of urbanization land and has an important impact on the competitiveness and development of the city. With the rapid development of social economy and the improvement of urbanization level, the demand for urban construction land will continue to increase. The acceleration of urban construction land expansion has become an inevitable trend. This paper plans and optimizes the layout to improve the utilization efficiency and rational utilization of urban construction land.The expansion of urban scale is to meet the balance of supply and demand. Therefore, it is necessary to meet the rational layout and maximize the benefits. The feasibility of urban scale expansion should consider the following factors: demographic factors, economic factors, location factors, social factors, policy factors, etc. [19]. The traditional prediction methods include the linear regression method and gradient descent method. The linear regression method takes the factors affecting the price as variable parameters, which are expressed by x=x1,x2,⋯,xmT (T represents matrix transposition), d represents the sum of output variables, w1,w2,⋯wm represents unknown parameters, and the expected error of the model is expressed by ε, so the linear regression equation shown in formula (1) can be established.
(1)d=∑j=1mwjxj+ε.The gradient descent method randomly initializes the factors affecting house prices to achieve the purpose of optimizing the function and obtains the optimized linear regression model, as shown in(2)hθ=∑j=0nθjxj.In formula (2), m represents the number of training set samples, n represents the number of features, hx represents the fitting function, Jθ represents the loss function, and the loss function formula is shown in
(3)Jθ12m∑i=1myi−hθxi2.Random gradient descent method and batch gradient descent method are commonly used gradient descent methods. In the random gradient descent method, the partial derivative of the error functionJθ is shown in
(4)∂Jθ∂θj=−1m∑i=1myi−hθxixjiAfter the update of eachθ, the function of risk minimization is obtained, as shown in
(5)θji=θj=1m∑i=1myi−hθxixji.It can be seen from equations (4) and (5) that when the value of m is particularly large, the process of fitting the function will consume more time. In the batch gradient descent method, all sample sizes are trained and the partial derivatives of parameters are obtained. The calculation formula is shown in
(6)θji=θj+yi−hθxixjiAfter eliminating the characteristic function, the batch gradient descent method can obtain the optimal solution of more data with fewer samples and determine which gradient descent method to choose according to the actual demand (brindle k m et al. 2021) [20]. During data analysis, some original data have problems such as duplication or deletion. Therefore, the original data needs to be preprocessed so that the data can be applied to the model. The data processing method is to remove the uniqueness. The data that does not belong to the characteristics of the data sample and has no impact on the modeling can be deleted directly. The missing data can be supplemented or deleted by the average. The data often has orders of magnitude differences, so the data of different orders of magnitude and different quantity levels are standardizes and regularized to ensure the experimental reliability. The common ones are min max standardization and Z-score standardization [21].Min max standardization is to map the valuex of attribute A into the 0,1 interval through standardization, and the formula is shown in
(7)x′=x−minxmaxx−minx.Z-score standardization is to regularize the average and standard deviation of the original data x. The obtained formula is shown in
(8)x′=x−xmeanxstd.In equation (8), mean represents the average value and std represents the standard deviation. Set the data set as D=x1⟶,y1,x2⟶,y2,⋯xN⟶,yN,xi⟶=xi1,xi2,⋯xid,T and calculate the norm Lp as shown in
(9)Lpxi⟶=xi1p+xi2p+⋯+xidp1/p.The result of regularization is shown in(10)xi⟶=xi1Lpxi⟶,xi2Lpxi⟶,⋯,xidLpxi⟶T.The specific process of BP neural network model is shown in Figure1.Figure 1
BP neural network algorithm flow.


### 3.2. Neural Network Optimized by Immune Clonal Genetic Algorithm

The good genes suitable for the environment will be selected by the environment to survive, and the unsuitable genes will be gradually eliminated. This natural law idea of survival of the fittest is applied to the process of finding the optimal solution to obtain the genetic algorithm (GA) [22]. Genetic algorithm can adjust the search algorithm through its own adaptation, without formulating certain rules. It can also find the optimal solution with probability when the objective function is not clear and can process multiple sample data at the same time, so as to improve the efficiency of the algorithm without avoiding the local optimal solution [23].At the initial stage of the algorithm, data samples will be randomly generated. The samples have the attributes to solve the problem. After imitating the way of biological selection, cross-reproduction, and obtaining mutated genes, the algorithm will generate a sample set more suitable for solving the problem and finally obtain the optimal solution through repetition, Then, the algorithm is accelerated by adjusting the parameters to obtain the optimal solution without falling into the local optimal solution [24]. The main steps are to code with specified numbers, letters, and other methods, generate random initial samples, evaluate the fitness in the initial sample individuals, and judge whether the operation meets the termination conditions through selection, crossover, and mutation. The flow chart is shown in Figure 2.Figure 2
Chart of genetic algorithm.The chromosome coding of genetic algorithm is very important to the evolutionary efficiency. The commonly used coding includes binary coding, gray coding, and floating point coding. Although binary coding has many processing features and high accuracy in genetic algorithm, it is not universal. The commonly used coding is floating-point coding. Floating-point coding uses real numerical values to realize algorithm operation, which is direct, simple, and widely used. The fitness function of genetic algorithm is used to evaluate the fitness value of sample individuals. The design of fitness function needs to avoid the problems that large individual differences in the early stage of evolution affect the search ability and small differences in the later stage of evolution weaken the performance of the algorithm. The selection of fitness function directly affects the convergence speed of genetic algorithm and whether it can find the optimal solution. Because genetic algorithm basically does not use external information in evolutionary search, it only uses the fitness of each individual of the population to search based on the fitness function. Because the complexity of fitness function is the main component of the complexity of genetic algorithm, the design of fitness function should be as simple as possible to minimize the time complexity of calculation. The transformation method of fitness function value is shown in(11)Fitfx=11+c+fx,c≥0,c+fx≥0,wherec represents the bound estimation of fx, and equation (11) is used to find the minimum value problem. Similarly, the problem of finding the maximum value can be obtained, and the function is shown in
(12)Fitfx=11+c−fx,c≥0,c−fx≥0.Genetic operation includes the process of selection, crossover, and mutation. Individuals with problem-solving attributes are selected from large samples to form new samples. The quality of individuals directly affects the results of the algorithm. In order to meet the randomness of sampling, the sampling mode of roulette can be selected. The probability formula of Roulette is shown in equation (13). Genetic operation includes the process of selection, crossover, and mutation. Individuals with problem-solving attributes are selected from large samples to form new samples. The quality of individuals directly affects the results of the algorithm. In order to meet the randomness of sampling, the sampling mode of roulette can be selected. The probability formula of roulette is shown in
(13)pk=fxkF=fxk∑k=1nfxk,k=1,2,⋯,n.,wherepk represents the probability of being selected, xk represents any individual, and fxk represents the fitness value of any individual. After the selection operation is completed through the above function, the crossover operation is carried out. First, the parent is selected. The parent is a combination obtained by random pairing of two individuals, and the individual selection is random sampling from the sample with the highest fitness value. The individual attributes are exchanged through one-point crossing and multipoint crossing to obtain the offspring. The one-point crossing diagram is shown in Figure 3.Figure 3
One-point intersection example.Randomly select a point on the chromosome, divide the chromosome into two parts, and exchange the parts before or after the intersection to obtain new offspring. This process is cross-operation [25]. Now, swap the 5678 alleles of the parent in Figure 2, and the chromosome number is encoded in binary. Then, the fitness values f of the parent before crossover are 24+22+202=441 and 27+24+212=21316, respectively. After exchange, the fitness values of the offspring are 24+212=324 and 27+24+22+202=22201. The results show that the fitness value of the offspring may evolve more than that of parents through the recombination of parents. Mutation operation is based on the theory of small probability. Some genes of chromosome mutate to form new individuals. Binary coding is to change “1” into “0” or “0” into “1.” When such mutation operator is used in GA, it can not only prevent the immature phenomenon of the algorithm in the training process but also achieve the effect of optimizing GA. The parameters of the genetic algorithm depend on the population size M, and according to the actual situation, the value range is 10−200, the crossover probability Pc and the general value range of crossover probability 0.4−0.99, and the mutation probability Pm and the general value range 0.0001−0.1.Due to the great limitations of the BP neural network, the convergence speed of function is slow and the accuracy of prediction value is relatively low. Using Hamming distance method to measure the common points or similarities between different individuals, the penalty function is applied to increase the elimination probability of individuals with low fitness and maintain individuals with high fitness. This method is niche technology. Adjusting the fitness of all individuals is to use the mechanism of sharing function to express the sharing degree with the sum of the sharing values among all individuals, as shown in(14)Si=∑j=1nSdij.The sharing value of individuali and individual j is represented by dij, S represents the sharing function, and the sum of sharing degrees of all individuals is represented by Si. The adjustment formula of individual fitness is shown in
(15)Fitfsi=fiSi.The step of immune cloning algorithm is to randomly generate a setH, which contains antibodies, and the size of the antibody is expressed in N. Then, the affinity between each antibody in the set is calculated, and the n antibodies with the highest affinity value are reconstituted into a new set. Copy the antibodies in the new set. Each antibody copies a certain number to temporarily form a clone set. The clonable set is given a certain mutation probability, and the mutated set is represented by Cn. Calculate the antibody affinity in the mutated set and then select the first few antibodies with the highest affinity value. These antibodies form a memory cell set and replace the antibodies with low affinity value in the initial set H, so as to maintain the diversity of antibody population.


## 3.1. Prediction of Urban Scale Expansion and Construction of Neural Network

Urban construction land is directly related to the rational layout and optimal utilization of urbanization land and has an important impact on the competitiveness and development of the city. With the rapid development of social economy and the improvement of urbanization level, the demand for urban construction land will continue to increase. The acceleration of urban construction land expansion has become an inevitable trend. This paper plans and optimizes the layout to improve the utilization efficiency and rational utilization of urban construction land.The expansion of urban scale is to meet the balance of supply and demand. Therefore, it is necessary to meet the rational layout and maximize the benefits. The feasibility of urban scale expansion should consider the following factors: demographic factors, economic factors, location factors, social factors, policy factors, etc. [19]. The traditional prediction methods include the linear regression method and gradient descent method. The linear regression method takes the factors affecting the price as variable parameters, which are expressed by x=x1,x2,⋯,xmT (T represents matrix transposition), d represents the sum of output variables, w1,w2,⋯wm represents unknown parameters, and the expected error of the model is expressed by ε, so the linear regression equation shown in formula (1) can be established.
(1)d=∑j=1mwjxj+ε.The gradient descent method randomly initializes the factors affecting house prices to achieve the purpose of optimizing the function and obtains the optimized linear regression model, as shown in(2)hθ=∑j=0nθjxj.In formula (2), m represents the number of training set samples, n represents the number of features, hx represents the fitting function, Jθ represents the loss function, and the loss function formula is shown in
(3)Jθ12m∑i=1myi−hθxi2.Random gradient descent method and batch gradient descent method are commonly used gradient descent methods. In the random gradient descent method, the partial derivative of the error functionJθ is shown in
(4)∂Jθ∂θj=−1m∑i=1myi−hθxixjiAfter the update of eachθ, the function of risk minimization is obtained, as shown in
(5)θji=θj=1m∑i=1myi−hθxixji.It can be seen from equations (4) and (5) that when the value of m is particularly large, the process of fitting the function will consume more time. In the batch gradient descent method, all sample sizes are trained and the partial derivatives of parameters are obtained. The calculation formula is shown in
(6)θji=θj+yi−hθxixjiAfter eliminating the characteristic function, the batch gradient descent method can obtain the optimal solution of more data with fewer samples and determine which gradient descent method to choose according to the actual demand (brindle k m et al. 2021) [20]. During data analysis, some original data have problems such as duplication or deletion. Therefore, the original data needs to be preprocessed so that the data can be applied to the model. The data processing method is to remove the uniqueness. The data that does not belong to the characteristics of the data sample and has no impact on the modeling can be deleted directly. The missing data can be supplemented or deleted by the average. The data often has orders of magnitude differences, so the data of different orders of magnitude and different quantity levels are standardizes and regularized to ensure the experimental reliability. The common ones are min max standardization and Z-score standardization [21].Min max standardization is to map the valuex of attribute A into the 0,1 interval through standardization, and the formula is shown in
(7)x′=x−minxmaxx−minx.Z-score standardization is to regularize the average and standard deviation of the original data x. The obtained formula is shown in
(8)x′=x−xmeanxstd.In equation (8), mean represents the average value and std represents the standard deviation. Set the data set as D=x1⟶,y1,x2⟶,y2,⋯xN⟶,yN,xi⟶=xi1,xi2,⋯xid,T and calculate the norm Lp as shown in
(9)Lpxi⟶=xi1p+xi2p+⋯+xidp1/p.The result of regularization is shown in(10)xi⟶=xi1Lpxi⟶,xi2Lpxi⟶,⋯,xidLpxi⟶T.The specific process of BP neural network model is shown in Figure1.Figure 1
BP neural network algorithm flow.


## 3.2. Neural Network Optimized by Immune Clonal Genetic Algorithm

The good genes suitable for the environment will be selected by the environment to survive, and the unsuitable genes will be gradually eliminated. This natural law idea of survival of the fittest is applied to the process of finding the optimal solution to obtain the genetic algorithm (GA) [22]. Genetic algorithm can adjust the search algorithm through its own adaptation, without formulating certain rules. It can also find the optimal solution with probability when the objective function is not clear and can process multiple sample data at the same time, so as to improve the efficiency of the algorithm without avoiding the local optimal solution [23].At the initial stage of the algorithm, data samples will be randomly generated. The samples have the attributes to solve the problem. After imitating the way of biological selection, cross-reproduction, and obtaining mutated genes, the algorithm will generate a sample set more suitable for solving the problem and finally obtain the optimal solution through repetition, Then, the algorithm is accelerated by adjusting the parameters to obtain the optimal solution without falling into the local optimal solution [24]. The main steps are to code with specified numbers, letters, and other methods, generate random initial samples, evaluate the fitness in the initial sample individuals, and judge whether the operation meets the termination conditions through selection, crossover, and mutation. The flow chart is shown in Figure 2.Figure 2
Chart of genetic algorithm.The chromosome coding of genetic algorithm is very important to the evolutionary efficiency. The commonly used coding includes binary coding, gray coding, and floating point coding. Although binary coding has many processing features and high accuracy in genetic algorithm, it is not universal. The commonly used coding is floating-point coding. Floating-point coding uses real numerical values to realize algorithm operation, which is direct, simple, and widely used. The fitness function of genetic algorithm is used to evaluate the fitness value of sample individuals. The design of fitness function needs to avoid the problems that large individual differences in the early stage of evolution affect the search ability and small differences in the later stage of evolution weaken the performance of the algorithm. The selection of fitness function directly affects the convergence speed of genetic algorithm and whether it can find the optimal solution. Because genetic algorithm basically does not use external information in evolutionary search, it only uses the fitness of each individual of the population to search based on the fitness function. Because the complexity of fitness function is the main component of the complexity of genetic algorithm, the design of fitness function should be as simple as possible to minimize the time complexity of calculation. The transformation method of fitness function value is shown in(11)Fitfx=11+c+fx,c≥0,c+fx≥0,wherec represents the bound estimation of fx, and equation (11) is used to find the minimum value problem. Similarly, the problem of finding the maximum value can be obtained, and the function is shown in
(12)Fitfx=11+c−fx,c≥0,c−fx≥0.Genetic operation includes the process of selection, crossover, and mutation. Individuals with problem-solving attributes are selected from large samples to form new samples. The quality of individuals directly affects the results of the algorithm. In order to meet the randomness of sampling, the sampling mode of roulette can be selected. The probability formula of Roulette is shown in equation (13). Genetic operation includes the process of selection, crossover, and mutation. Individuals with problem-solving attributes are selected from large samples to form new samples. The quality of individuals directly affects the results of the algorithm. In order to meet the randomness of sampling, the sampling mode of roulette can be selected. The probability formula of roulette is shown in
(13)pk=fxkF=fxk∑k=1nfxk,k=1,2,⋯,n.,wherepk represents the probability of being selected, xk represents any individual, and fxk represents the fitness value of any individual. After the selection operation is completed through the above function, the crossover operation is carried out. First, the parent is selected. The parent is a combination obtained by random pairing of two individuals, and the individual selection is random sampling from the sample with the highest fitness value. The individual attributes are exchanged through one-point crossing and multipoint crossing to obtain the offspring. The one-point crossing diagram is shown in Figure 3.Figure 3
One-point intersection example.Randomly select a point on the chromosome, divide the chromosome into two parts, and exchange the parts before or after the intersection to obtain new offspring. This process is cross-operation [25]. Now, swap the 5678 alleles of the parent in Figure 2, and the chromosome number is encoded in binary. Then, the fitness values f of the parent before crossover are 24+22+202=441 and 27+24+212=21316, respectively. After exchange, the fitness values of the offspring are 24+212=324 and 27+24+22+202=22201. The results show that the fitness value of the offspring may evolve more than that of parents through the recombination of parents. Mutation operation is based on the theory of small probability. Some genes of chromosome mutate to form new individuals. Binary coding is to change “1” into “0” or “0” into “1.” When such mutation operator is used in GA, it can not only prevent the immature phenomenon of the algorithm in the training process but also achieve the effect of optimizing GA. The parameters of the genetic algorithm depend on the population size M, and according to the actual situation, the value range is 10−200, the crossover probability Pc and the general value range of crossover probability 0.4−0.99, and the mutation probability Pm and the general value range 0.0001−0.1.Due to the great limitations of the BP neural network, the convergence speed of function is slow and the accuracy of prediction value is relatively low. Using Hamming distance method to measure the common points or similarities between different individuals, the penalty function is applied to increase the elimination probability of individuals with low fitness and maintain individuals with high fitness. This method is niche technology. Adjusting the fitness of all individuals is to use the mechanism of sharing function to express the sharing degree with the sum of the sharing values among all individuals, as shown in(14)Si=∑j=1nSdij.The sharing value of individuali and individual j is represented by dij, S represents the sharing function, and the sum of sharing degrees of all individuals is represented by Si. The adjustment formula of individual fitness is shown in
(15)Fitfsi=fiSi.The step of immune cloning algorithm is to randomly generate a setH, which contains antibodies, and the size of the antibody is expressed in N. Then, the affinity between each antibody in the set is calculated, and the n antibodies with the highest affinity value are reconstituted into a new set. Copy the antibodies in the new set. Each antibody copies a certain number to temporarily form a clone set. The clonable set is given a certain mutation probability, and the mutated set is represented by Cn. Calculate the antibody affinity in the mutated set and then select the first few antibodies with the highest affinity value. These antibodies form a memory cell set and replace the antibodies with low affinity value in the initial set H, so as to maintain the diversity of antibody population.


## 4. Experimental Design and Analysis

Too much sample data selection will lead to slow operation speed. On the contrary, too little sample data will affect the accuracy of prediction. Here, 500 groups of data samples are selected, of which 400 groups are randomly selected as input data, and the remaining 100 groups are used as test samples to test the effect of the model through error comparison. The columns contained in a dimension that represent the dimension are called dimension attributes. Get dimension properties from the report. Or talk to business personnel to get. When the attribute hierarchy is instantiated as a series of dimensions instead of a single dimension, it is called a snowflake pattern. The operation of merging the attribute hierarchy of a dimension into a single dimension is called denormalization. Using snowflake mode, users need a lot of correlation operations in the process of statistical analysis, which has high complexity and poor query performance. It is convenient, easy to use, and has good performance. Due to different dimensions between data sources, effective comparison cannot be carried out. It needs to be normalized to convert dimensional data into dimensionless data and map the data of statistical probability between0,1, and the mapping of data is in the range of −1,1. The normalization formula of the original data through the premnmx function is shown in
(16)PN=2p−minpmaxp−minp−1,TN=2t−mintmaxt−mint−1.In equation (16), p is the input sample of the original data, t is the output sample of the original data, minp and mint represent the minimum value of the original input sample and output sample, respectively, and maxp and maxt represent the maximum value of the original input sample and output sample, respectively. PN and TN obtained by normalization represent the factors affecting the expansion of urban scale and the value of expansion scale, respectively. The data obtained after fitting by the BP neural network is still the normalized data, and the inverse normalization function is also required to obtain the normal value. After normalizing the original data output samples, the numerical diagram is obtained, as shown in Figure 4.Figure 4
Normalized urban expansion curve.The dimensionality of data samples is different and needs to be reduced. PCA dimensionality reduction method can be used. Based on linear transformation, the high-dimensional data is projected into the low-level space, that is, the dimensions with a large amount of information in the data are saved and the unimportant information is deleted, which can effectively reduce the running time of the algorithm. Firstly, the sample features are averaged, that is, the difference between the sample features and the feature mean of the rigid sample, the eigenvalues and eigenvectors in the covariance matrix of the sample are calculated, and the eigenvectors corresponding to the previous maximum eigenvalues are selected and recombined into a new matrix to obtain a new sample set. According to the experimental data, the contribution rates corresponding to different dimensions are obtained according to PCA dimensionality reduction, as shown in Table1.Table 1
Contribution rate of different dimensions.
DimensionContribution rate (%)DimensionContribution rate (%)147.1767893.0468258.2130995.1792367.78111096.8751474.38441197.5912580.81251298.3073685.87461399.6110789.996814100.0000According to the dimension reduction experiment, the convergence curve of contribution rate after 9-dimensional class is gradually slow, so 9-dimensional data are selected for experimental simulation. In the construction of the BP neural network model, a three-layer network structure is selected to meet the requirements of the operation rate. Nine-dimensional data is used as the number of neurons in the input layer of neural network, and the number of neurons in the output layer is the result of urban expansion prediction. The number of neurons in the hidden layer needs to be determined by trial and error. Too few or too many neurons in the hidden layer will affect the output error. Therefore, the number of neurons in the hidden layer is determined to be 5-16 according to the common empirical formula. When the number of sample sets is different and other conditions are the same, the comparison of network errors corresponding to different numbers of nodes in the hidden layer is shown in Figure5.Figure 5
Network training error corresponding to the number of hidden layers.According to the simulation results in the figure, when the training error reaches the minimum value of 0.053645, the number of neurons in the hidden layer is 14, so the number of neuron nodes is 14. To sum up, the number of neurons in the input layer of the experimental model is 9, the number of neurons in the hidden layer is 14, and the number of neurons in the output layer is 1.If the learning rate of BP neural network is set too high, it may lead to the error of optimal solution. If the learning rate is too small, it will lead to the long running time of the algorithm. The appropriate learning rate can make the algorithm have better operation performance. Set the learning rate to 0.2 to 0.7. The results are shown in Figure6.Figure 6
Network training error corresponding to different learning rates.Different training times also have a certain impact on the prediction accuracy. Therefore, gradually increase the training times based on the determination of the neural network framework structure and analyze its correlation with the accuracy prediction. The results are shown in Figure7. The population size can be determined by the optimized performance of the algorithm. After comparing the prediction accuracy and simulation time, it can be determined that the population size is the best of 50.Figure 7
Network training error corresponding to different training times.The convergence accuracy of the genetic algorithm will be affected by the number of iterations. It is necessary to find a balance between efficiency and accuracy when the algorithm converges. When the crossover probability is large, the offspring will produce unstable changes and destroy the excellent model of the population. On the contrary, when the crossover probability is small, the evolution process of the algorithm will slow down and spend a lot of time in the genetic search stage. Therefore, the crossover probability is generally limited to 0.4-0.99. The error size and simulation time results corresponding to different crossover probabilities are shown in Table2. When the algorithm error is small and the simulation time is appropriate, the crossover probability is 0.652.Table 2
Algorithm and simulation time corresponding to different cross-probabilities.
Crossover probabilityAlgorithm errorSimulation time (seconds)0.40400.04380.26790.48880.03960.26790.57370.08150.17330.65850.03740.28360.74340.07540.15760.82820.08400.17330.91300.02810.66180.99790.03990.8193Because the mutation probability will affect the generation of new individuals, the mutation probability is too high, and the generation probability of new individuals will also increase, which may also destroy the existing excellent pattern structure. On the contrary, the mutation probability is too small, there is no change of new individuals, and it is not conducive to the convergence of the algorithm. Therefore, the range of mutation probability is limited to 0.0001-0.1, and the initial value is 0.01. Through the above experiments, the parameters of the prediction model for predicting urban scale expansion are obtained, which are summarized as shown in Table3.Table 3
Parameters of neural network.
Parameter nameParameter valueParameter nameParameter valueNumber of network layers3Training times150Enter the number of layers9Population size50Number of hidden layers14Number of iterations80Number of output layers1Crossover probability0.652Learning rate0.45Variation probability0.01After the model parameters are determined, the performance of the model is reflected through the model results. The relationship between the training times under different models and the target error is shown in Figure8.Figure 8
Comparison of BP neural network training under different models.The mean square error levels of the three neural networks can be seen from Figure8. Among them, the mean square error level of the BP neural network is the highest, and GA-BP neural network. The lowest error is the CGA-BP neural network. The difference between the estimated quantity and the estimated quantity is the smallest. After training the GA-BP neural network and CGA-BP neural network model, the relationship between iteration times and fitness value is shown in Figure 9.Figure 9
Comparison of iteration times of genetic algorithm under different algorithms.


## 5. Conclusion

For urban development, a prediction model of urban scale expansion based on the BP neural network optimized by Xiaosheng genetic algorithm is proposed and compared with other models. The results show that the neural network parameters have suitable values, the number of model dimensions is about 9, the contribution rate of the model is more than 95% and tends to be stable, the network training error is the smallest, the number of hidden layer nodes is 14, and the model learning rate is 0.45. The number of data samples will also affect the network training error, and with the increase of training times, the error change is no longer significant. When the number of samples is 400, the number of training times is 50, and the error tends to be flat. Considering the optimization accuracy and simulation time, the population size is the best value of 50. When the number of iterations of the model is 150, the genetic algorithm begins to converge and the running time of the algorithm is less. The crossover probability can be seen from Table2. When the crossover probability is 0.652, the error is small on the basis of moderate simulation time, and the mutation probability can neither be large nor small, so it is set to 0.01. When the parameter conditions are the same, the BP neural network model, GA-BP neural network model, and CGA-BP neural network model are compared. The CGA-BP neural network model achieves the target error when the number of training is 79, which is better than the other two models. The fitness value corresponding to the number of iterations also shows that the best fitness value of thr CGA-BP neural network when the number of iterations is the least is also higher than other models, Therefore, the neural network model optimized by genetic algorithm is more suitable for the prediction of urban scale expansion. However, there are still some limitations in this paper. Limited by various conditions, the research still has deficiencies, and the parameter setting is not comprehensive enough. Genetic algorithm is insufficient to optimize the neural network structure model. In the follow-up work, it is necessary to further improve the quality of the research model and obtain the prediction results more accurately.



---

*Source: 5407319-2022-07-14.xml*