Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

An improved artificial gorilla troops optimizer for BP neural network-based housing price prediction

Abstract

In the context of global economic austerity in the post epidemic era, housing, as one of the basic human needs, has become particularly important for accurate prediction of house prices. BP neural network is widely used in prediction tasks, but their performance is easily affected by weights and biases, and thus metaheuristic algorithms are needed to optimize the network parameters. Firstly, to address the shortcomings of the artificial Gorilla Troops Optimizer (GTO) in such optimization tasks, such as reduced population diversity, easy to fall into local optimal solutions and slow convergence, this paper proposes a fitness allocation strategy, a Cauchy variation strategy, and an elite evolution mechanism to improve the algorithm, which in turn results in an improved artificial Gorilla Troops Optimizer (IGTO). Subsequently, a BP neural network house price prediction model based on IGTO is constructed and experiments are conducted on four datasets, namely, Boston, California-Bay, California-Land and Taiwan. The experiments are first compared with eleven other swarm intelligence algorithms and then with four machine learning models, and the results show that IGTO-BPNN improved 17.66%, 18.27%, 28.10%, 49.35% and 24.83% on five evaluation metrics, namely, MAE, MAPE, R2, RMSE, and SMAPE, respectively. The improvement of these indicators fully proves the superiority and effectiveness of IGTO-BPNN in house price prediction.

1. Introduction

The post epidemic era is upon us and the global economy is tightening. Housing is one of the major expenditure items for households and there is an increasing demand for house price forecasting [1]. Housing prices, a crucial economic factor, hold significant importance for governments, developers, investors, and buyers [2]. Accurate predictions are essential due to the market’s changes and volatility. The property market affects national economic growth and urbanization [3].Historically, research on housing price prediction models can be categorized into two types: econometric statistics [4] and machine learning [5]. Oladunni, Timoth et al [6] used hedonic pricing theory to investigate the real estate market and improve the pricing model based on econometric concepts to benefit both home buyers and sellers. Similarly, Ling Yuheng [7] proposed a hedonic housing model to deal with both spatial and temporal latent structural issues and conducted an empirical study on apartment transaction prices in Corsica (France). Although the econometric model is characterized by simplicity and low computational effort, the accuracy of the prediction results is poor. With the integration of computer systems and the optimization of algorithm structures, machine learning methods have provided more excellent performance for house price forecasting [8,9].

Han, Eun-Joo et al [10] used LSTM and kernel density estimation information to predict apartment prices in Seoul and conducted comparative experiments with various models such as regression analysis and deep neural networks. The experimental results show that LSTM, which can reflect the time series, is more suitable for predicting house prices. Iyad Abu Doush et al [11] used an improved moth-flame optimization algorithm to enhance the performance of the training process of Multi-Layer Perceptron Neural Network, and it was applied to the iron ore price prediction problem. Based on the characteristics of houses and the conditions of the region they are located in, Zhu, Tianlei et al [12] utilized the machine learning model XGBoost and the grid search technique to predict house prices. Considering the complex relationships among multiple features in the house price dataset, Mostofi, Fatemeh et al [13] developed a hybrid multivariate graph convolutional network (GCN) to obtain richer inputs from multi-dependent relational information. The method has good prediction accuracy compared to other machine learning methods and also provides valuable insights into the factors affecting house prices. Iyad Abu-Doush et al [14] proposed an improved Harris Hawks optimizer to regulate the control parameters of a Multi-Layer Perceptron Neural Network model and applied it to gold price prediction. The experiments fully proved the effectiveness of the model. Xu, Wei et al [15] proposed a message-passing based Bayesian learning algorithm (EM-TDAMP), which provides a large number of numerical results to prove the advantages of the method through the application of house price prediction in Boston. Although machine learning techniques have good performance in prediction tasks, they also have limitations, such as high data requirements, complex training, and large computational costs. Among various machine learning techniques, BP neural networks stand out due to their simple training process, low data requirements, high efficiency, and strong universality, and have been widely applied in prediction tasks by scholars.

In order to study the relationship between the accessibility along the urban rail transit and the change of house price, Li Ruo-qi et al [16] used a BP neural network, and the experiment proved that the mean square error of the prediction result of this method was significantly reduced. Zhao Xiaoman et al [17] established a model of the influencing factors of hedonic commercial house price, and explored the application of the BP neural network in the prediction of the price of commercial house in Hefei. Nevertheless, the BP neural network has drawbacks, including slow error convergence and a tendency to fall into finite optimal solutions. This issue arises because the BP algorithm fundamentally operates as a steepest descent method based on gradient descent [18], using the first derivative of the error with respect to weights and biases to guide subsequent adjustments direction. The initial biases and weights in this network structure are critical to its predictive performance. As a result, many domestic and international researchers have begun employing BP neural networks enhanced by swarm intelligence algorithm (SI) to address these challenges [19,20].

Wang, Jining [21] et al. combined genetic algorithm and particle swarm optimization algorithm in order to improve the BP neural network, which resulted in the creation of a GA-PSO-BP neural network model that provided accurate carbon price prediction. Wang, Yuqin [22] designed an adaptive genetic-backpropagation (BP) neural network algorithm for solving the cavitation problem of centrifugal pumps during operation. Eldeghady, Ghada Shaban [23] et al. proposed a heuristic particle swarm optimization coupled with backpropagation neural network (BPNN-PSO) technique to improve the convergence and prediction accuracy of the fault diagnostic system for photovoltaic array systems. He, Zhongying [24] used a modified back-propagation neural network model (CPSO-BP-MC) using Coordinated Particle Swarm Optimization (CPSO) algorithm and Markov Chain (MC) technique to predict the bridge condition index. This shows the effectiveness of the stochastic iterative approach using SI instead of gradient descent in optimizing the weights and biases of BP neural networks, which is widely used in several fields.

In 2021, researchers introduced a novel swarm intelligence algorithm called the Artificial Gorilla Troops Optimizer (GTO) [25]. The primary objective of this algorithm is to formalize and emulate the mass behavior exhibited by gorillas, in order to develop innovative methods for both exploration and exploitation purposes. Consequently, it quickly gained popularity among scholars and found widespread applications in various domains. Ramadan, Ashraf et al [26] used GTO algorithm to solve the multi-objective function as a way to optimize the location and rating allocation of renewable distributed generators (RDG). The algorithm resulted in significant reduction in expected cost, radiation and voltage deviation in power systems. Asaad, Ali et al [27] used GTO algorithm to optimize the allocation of renewable energy sources and electric vehicle charging stations, which effectively increased the profit of the energy company and shortened the waiting time for charging of electric vehicles. For unit commitment (UC) optimization problem, Rihan, Mahmoud [28] used GTO algorithm to solve the UC problem in three different cases, which helps to save the operational cost.

Muruga, Sathesh [29] introduced an artificial gorilla troops optimizer for artificial neural networks to manage energy consumption in hybrid power distribution networks and experimentally demonstrated that the artificial gorilla troops optimizer-enhanced neural network energy management system provides 99.55% efficiency. Konakoglu, Berkant [30] evaluated the novel hybrid artificial neural network-artificial gorilla troops optimizer (ANN-GTO) to demonstrate superior ability in predicting zenithal wet delays. Wang, Bo [31] et al. utilized gated loop circuits with an artificial gorilla troops optimizer to efficiently optimize residential energy forecasts. Lin, Hanlei [32] designed a gorilla optimization kernel extreme learning with an improved Learner’s GoogleNet Migration Learning Model (GNet TL with IGT-KELM) for accurate detection of asphalt pavement cracks. The above studies show that the GTO algorithm is successful in neural network optimization, highlighting its superior performance. However, there are fewer studies related to the optimization of BP neural networks using the GTO algorithm for the problem of house price prediction.

As mentioned earlier, the current real estate market is in a fluctuating state, and the global economy also shows a tightening trend. In this context, the BP neural network has emerged as one of the many methods with its own unique advantages. It has a strong nonlinear fitting ability, which makes it extremely suitable for application in the field of house price prediction. However, the traditional BP neural network has certain limitations, and its performance is significantly affected by the initial weights and bias. In view of this, in order to optimize the network structure, this paper adopts stochastic optimization method to replace the gradient descent method. Meanwhile, the GTO algorithm has the advantage of simple structure, and its unique exploration and development mechanism gives it excellent global optimization ability. Based on the above characteristics, this paper selects GTO algorithm as a stochastic optimization method to train BP neural networks, and then constructs the GTO-BPNN house price model. However, a large number of pre-experimental results show that the GTO-BPNN model exposes some problems in the process of house price prediction, such as easy to fall into the local optimal solution and unable to converge quickly. Therefore, in order to improve the model performance, it is necessary to improve the GTO algorithm in this paper, so as to construct a new house price prediction model IGTO-BPNN. Table 1 is an explanation of abbreviations in this paper. These main contributions are summarized as follows:

  1. (1). The fitness allocation strategy dynamically adjusts population positions to enhance diversity, while the Cauchy mutation operator prevents convergence to suboptimal solutions. Additionally, the survival of the fittest mechanism evolves elite individuals and eliminates weaker ones, improving the algorithm’s global search capability. The improvement of GTO algorithm by three strategies forms IGTO.
  2. (2). The improved Artificial Gorilla Troops Optimizer (IGTO) is utilized to optimize these weights and biases of the BP neural network.
  3. (3). Housing price prediction experiments are conducted on four datasets (Boston, California-Bay, California-Land, and Taiwan), with IGTO-BPNN compared to a BP network optimized by eleven other SI algorithms and four machine learning models (LSTM, ELM, RBF, and CNN).

Fig 1 is the motivation for the paper. The remaining part of the study is structured as follows: an overview of the BP neural network and GTO algorithm is provided in Section 2. Section 3 describes the improvement motivation and strategy of IGTO algorithm and the proposal of IGTO-BPNN model. Section 4 describes the experimental setup, including data sources, parameter settings and evaluation index. The specific trial results and related analyses are presented in Section 5. Finally, the research work and future improvement direction of the paper are summarized in Section 6.

2. Related works

2.1. Back propagation neural network

The main working principle of BP neural network is divided into two stages: forward transfer of information and back propagation of error. In the process of forward transmission, firstly, by normalizing the data, each input is connected with the weighted total score which is calculated by Eq. 1.

(1)

Where A represents the number of input neurons. wab is the connection weight vector between the a-th input neuron and the b-th hidden neuron, and Xa is the a-th input neuron. εb represents the bias of the b-th hidden neuron. The intermediate vectors are then processed using the tansig activation function as shown in Eq. 2.

(2)

When the information enters the output layer, it is judged whether the error between the predicted value and the true value satisfies the demand. If it is not satisfied, the error is calculated and the error back propagation stage is entered. Using the gradient descent method, the first-order derivative of the error is used to guide the updating of the weights and biases in the network structure, and then the forward propagation is continued until the error meets the demand, and the predicted value is output, as shown in Eq. 3.

(3)

Where C is the number of neurons in the output layer, f(X) is the matrix of transformation vectors in the hidden layer. wbc stands for the b-th hidden neuron connecting weights to the c-th output neuron, and εc refers to the bias of connecting to the c-th hidden neuron. From Eq.1 and Eq.3, it can be obtained that the weights and biases in the network structure play a key role in the performance of BP neural networks. Therefore, finding suitable and appropriate weights and biases is a crucial task because they help to enhance the performance of BP neural networks and thus improve the prediction accuracy. Fig 2 shows the frame of BPNN.

2.2. Artificial gorilla troops optimizer

A gorilla group, referred to as a troop, consists of a silverback gorilla, multiple adult males and females, as well as their offspring. The leader of the group is the only silverback gorilla, which directs the ‘troops’ migration, foraging and resting, while the male gorilla usually tends to migrate to another group, compete for spouse rights with other male gorilla, and then form a new group with the female gorilla. Additionally, male gorillas serve as potential candidates for assuming the role of the silverback gorilla leader. This range of natural behaviors served as inspiration for the development of GTO [25]. This algorithm has been widely used to optimize various engineering problems [4345]. The method follows a detailed process outlined as follows:

I. Exploration Phase:

(4)

Eq. 4 includes several variables and parameters, such as ,which are arbitrary numbers ranging from 0 to 1. denotes the position of the population at the t-th iteration. The maximum and minimum values of the variables are represented by upper and lower, respectively. The variable p takes a value within [0,1]. A randomly chosen participant, denoted as , is defined within the formula. Additionally, A, B, and β are determined using Eq. 5-9.

(5)(6)(7)(8)(9)

In the formula, iteration represents the current stage, Max_ iteration denotes this maximum iteration value, is an arbitrary number ranging from [0,1], and l is a randomly selected value within [−1, 1].

Ⅱ. Exploitation phase

(1) Migrate to unknown places: β ≥ W

(10)(11)(12)

Within Eq. 1012, is the place of the silverback gorilla, known as the optimal solution. Nall denotes the number of populations.

(2) Batter for mature women: β < W

(13)(14)(15)(16)

Within Eq. 1316, is arbitrary number within the range of 0–1, and κ is the initial preset value. If , H represents an arbitrary number corresponding to this problem dimension and this normal distribution; otherwise, H is an uncertain number from the normal distribution. This GTO algorithm process is shown in Fig 3.

3. The proposal of IGTO-BPNN model

3.1. Improvement artificial gorilla troops optimizer (IGTO)

The NFL theorem [46] states that there is no comprehensively supreme algorithm that fulfills well for all challenges. The GTO algorithm is characterized by a fast search speed, wide exploration range, and good stability. Nonetheless, challenges persist when nearing the optimal solution, including diminished population diversity and convergence to finite optimal solutions. Our research team has conducted extensive scientific research on swarm intelligence optimization algorithms [47,48]. this article aims to enhance GTO from three specific aspects.

3.1.1. Fitness allocation strategy.

In a gorilla population, each male with superior physical attributes and posture tends to attract more females, thereby gaining mating rights. This behavior, known as “fitness allocation”, is modeled mathematically to simulate the dynamic adjustment of fitness weights assigned to individuals during each iteration. These weights are continuously adjusted throughout the optimization process to enhance the effectiveness of finding the optimal solution. The formula is as follows.

(17)

In Eq. 17, levy refers to Levy flight strategy. The fitness function value of the individual is calculated at the t-th iteration, with the best and worst fitness values denoted as and , respectively.

3.1.2. Cauchy variation strategy.

The Cauchy distribution is characterized by its probability density function in one dimension. It is displayed in Eq. 18.

(18)

When a = 1, the distribution is referred to as the standard Cauchy distribution, and it follows the generating function for random variables in this distribution, as shown in Eq. 19.

(19)

Based on this, the introduction of the Cauchy mutation operator is displayed in Eq. 20 [49,50].

(20)

The development phase of GTO is optimized in Eq. 21, where are two different individuals randomly selected in the previous iteration process.

(21)

3.1.3. Elite evolution mechanism.

The law of nature is always ‘natural selection, survival of the fittest’. Gorilla in foraging, migration and other group activities, if there are members foraging, hunting ability is poor, who can’t hunt for food for the population or lead to slow migration speed, such members will become this silverback gorilla to survive and eliminate this gorilla. Assuming that this gorilla elimination proportion coefficient is Q, the population elite evolution and the last elimination mechanism will be carried out according to EQ. round is a rounding function.

(22)(23)(24)

This fitness function value for all individuals is calculated using Eq. 22-24, and the top Nall individuals are selected in ascending order. If solving a maximization problem, the order is reversed.

In summary, the flowchart of IGTO is shown in Fig 4, and the corresponding pseudo-code s presented in algorithm 1.

Algorithm 1 Pseudo code for IGTO

BEGINING

Inputs: Nall, Max_ iteration, p, κ, w

Initialization the individuals 𝜍i using Eq. (17)

Calculate the fitness value

WHILE iteration ≤Max_ iteration do

 Adjust the β and A using Eq. (5–7)

 For (i = 1,2……Nall) do

  Adjust this place of Gorilla using Eq. (17)

 End for

 Set 𝜍silverback as this place of silverback

 For (i = 1,2……Nall) do

  If𝜈 > 0.8

   Adjust the place of Gorilla using Eq. (10)

  Elseif 0.4 < 𝜈 ≤ 0.8

   Adjust the place of Gorilla using Eq. (13)

  Else

   Adjust the place of Gorilla using Eq. (21)

  End for

  Calculate the fitness value using Eq. (24)

  Set 𝜍silverback as this place of silverback

 End while

 Return 𝜍silverback and best score

 End

3.2. IGTO optimizes BP neural networks

The preliminary weights and biases of BPNN are produced at random, significantly influencing the network’s performance. The IGTO method is used to optimize the BP neural network in this paper. The step-by-step implementation process is outlined as follows:

  1. 1). Set the relevant parameters and define the network architecture of the BPNN.
  2. 2). Apply the initial individuals place of IGTO as the biases and weights of BPNN.
  3. 3). Train this neural network, optimizing it with utilizing the training error value as the fitness function of IGTO.
  4. 4). Update the positions of the individuals recursively using the IGTO algorithm to seek the best solution.
  5. 5). Check the termination condition of the method. If satisfied, terminate this optimization and output the optimal weights and biases found by IGTO. Otherwise, continue the iteration.
  6. 6). Use the best weight and bias from the output as the original weight and bias for the IGTO-BPNN model.

4. Experiment preparation

All experiments in this paper are carried out under Windows 11, X-64 operating system, MATLAB version is R2023a. In order to better evaluate the performance of the IGTO-BPNN house price prediction model, it is firstly compared like-for-like with BPNNs optimized by eleven SI algorithms, including: PSO [34], CMA-ES [40], SaDE [35], GWO [36], MFO [37], WOA [38], HHO [39], GTO, FDB_TLABC [33], WSO [41], EHO [42]. Then, after the comparison of the IGTO-BPNN with four classical machine learning models including: CNN [51], ELM [52], LSTM [53], RBF [54].

4.1. Dataset

This paper utilizes the IGTO-BPNN model to predict house prices. A total of four public data sets are taken, which are:

  1. 1). The Boston House Price Dataset [55] is hosted on the UCI platform. This data set has 14 attributes, of which the first 13 columns are used as feature inputs, including: crime rate, residential area, average number of rooms, etc. The last column is the label of the real value of the house price to be predicted, and the data set is named “Boston”.
  2. 2). California housing price data set [56], including a total of 10 columns of longitude, latitude, residential years, room total, etc., of which columns 9 and 10 are the real value label of housing price and the location area of the house (near the bay, 1 nautical mile from the sea, inland, islands). To account for the influence of independent variables, in this paper, this dataset is extracted into two datasets “close to the bay” and “inland”, each of which retains the first 8 columns as feature input and the 9th column as house price output, and the datasets are named “Ca-Bay” and “Ca-Land”, respectively.
  3. 3). Xindian District, New Taipei City, Taiwan [57], which includes a total of 7 columns such as the age of the house, nearest subway station, convenience store, etc. However, since the first column is a time series and not relevant to this article, it is removed. Consequently, the processed dataset consists of 6 columns. The last column represents the real value label of the house price and is named “Taiwan”.

4.2. Evaluation indicators

This paper focuses on data regression prediction and utilizes various evaluation indexes [5860], involving Root Mean Square Error (RMSE), R-square (R2), Mean Absolute Percentage Error (MAPE), Mean Absolute Error (MAE) and Symmetric Mean Absolute Percentage Error (SMAPE). The calculation formula for these indexes is presented in Table 2. Generally, smaller values for these indicators signify better performance, except for R2, where values closer to 1 indicate better performance. In Table 2, A represents the number of data, representing the true and predicted values, respectively.

4.3. Fitness function design

In this study, the BPNN is enhanced using a SI algorithm. The mean squared error between the actual and predicted values in the training set is calculated and summed. As a result, these dynamic convergence curves of the fitness value for each SI algorithm are generated. The objective function is established as shown in Eq. 25, where A represents the number of data, while Xreal and Xpred are the true and predicted values, respectively.

(25)

4.4. Experimental parameter setting

The initial framework of the BP neural network is constructed based on the BP theorem, which posits that a 3-layer BP neural network is sufficient to approximate any nonlinear fitting function. Considering the different data feature inputs, a 3-layer network with 6 hidden neurons is utilized in the experiment. This tansig activation function is applied to transmit signals from this input layer to this hidden layer, while this purelin activation function is employed to transfer signals from this hidden layer to this output layer. Each iteration consists of 200 trials with a learning rate of 0.01, aiming to achieve an error accuracy of 10−6 after training. The IGTO algorithm adopts Nall = 30, Max_iteration = 100, p = 0.03, κ = 3, and w = 0.8. The parameter settings for the remaining comparison experiments are provided in Table 3. All datasets are divided into training and testing sets with a 7:3 ratio. After 30 experimental cycles, the average values of all evaluation indexes are presented.

4.5. Parameter sensitivity analysis

In the original GTO algorithm, the parameters are set as shown in Table 3, and the IGTO algorithm proposed in this paper does not change these parameters. The p in Eq.4 is used to control how the population searches in the solution set space. k is the set value given in Eq.15 to calculate the position of the population localized exploitation. w is used to control how the population chooses the position update during localized exploitation. In this subsection, the Boston house price dataset is used as an example, the number of populations is set to 30, and the maximum number of iterations is 100. For the parameter settings of the IGTO algorithm, the three parameters are respectively increased and decreased in the experiments (see Table 4). By comparing the MAE, as shown in Fig 5, it is shown that the optimal parameter settings in the IGTO algorithm are p = 0.03, κ = 3, w = 0.8.

5. Experimental results and analysis

5.1. Compared with other SI-BPNN

In this study, the performance of IGTO-BPNN is assessed by comparing with BPNNs optimized by eleven SI algorithms, including: PSO, CMA-ES, SaDE, GWO, MFO, WOA, HHO, GTO, FDB_TLABC, WSO, EHO. Fig 6 illustrates the dynamic convergence process of the fitness function for these twelve optimization models as they search for these best biases and weights of BPNN.

From the performance of the convergence curves, the optimization effect of IGTO-BPNN on the four house price datasets is significantly better than that of other SI algorithms. IGTO-BPNN not only performs faster in terms of convergence speed and is able to reach the stable state earlier, but also has a lower value of final fitness, which indicates that it is able to find a better solution in the optimization process. In addition, the curve of IGTO-BPNN is smoother and more stable, avoiding the fluctuations and falling into local optimal solutions that are common in other algorithms. This is due to the improvement strategies of IGTO algorithm, including the fitness allocation strategy, the Cauchy variation strategy and the elite evolution mechanism, which make IGTO perform better in global search and avoiding local optimums, thus improving the optimization efficiency and accuracy of the results. Specific data for the five evaluation metrics are tabulated in Tables 5–8-8, while standard deviations (SD) and run times are also recorded. Bold indicates the optimal value. The SD is calculated from the MAE after 30 cycles and is used to measure the stability of the algorithm.

From Tables 5–8 IGTO-BPNN shows obvious superiority in all five evaluation metrics (MAE, MAPE, R2, RMSE, SMAPE). Whether on Boston, Ca-Bay, Ca-Land or Taiwan datasets, the MAPE and RMSE values of IGTO-BPNN are always lower than those of other SI algorithms, showing its advantages in prediction accuracy and error control. Especially on the R2 value, IGTO-BPNN is able to provide a high degree of fit, especially on the Boston dataset, with an R2 value of 0.8881, which is much higher than that of other SI algorithms, indicating that it is more capable of capturing the data changes. Meanwhile, the MAE and SMAPE values of IGTO-BPNN are always the lowest on the four datasets, which further proves that it has less error and better stability in the optimization process. In summary, IGTO-BPNN shows higher accuracy and stability in weight and bias optimization, proving its superiority in BP neural network optimization. For the SD, IGTO – BPNN achieves the best value twice in the four datasets. In Ca-Bay and Taiwan datasets, this paper’s method did not obtain the best value, but the SD is always at a low level and tops the list. This indicates that the IGTO-BPNN model is more stable in house price prediction problem with low probability of randomness. In addition, the statistical running time is used to measure the computational efficiency of different models. The running time of the IGTO-BPNN in the Boston and Ca-Land datasets is 83.4011s and 72.6272s, respectively, which is in the first place, much better than the original GTO-BPNN model’s 113.2486s and 174.4155s, which highlights the three improved strategies in this paper. The IGTO-BPNN also ensures better computational efficiency in Ca-Bay and Taiwan datasets.

Fig 7 presents the rankings of the above 13 models in the four datasets based on five evaluation metrics, which also cover SD and running time. The IGTO-BPNN model achieves a total of 19 first places, while the original GTO-BPNN model only achieves 7 second places.

Upon comparing the prediction conclusions of the models across these datasets (only showing the first ten test data in Figs 811, it is apparent that the proposed IGTO-BPNN prediction model delivers the most favorable outcomes. Figs 811 show the validation results of the twelve SI-BPNN models and the original BPNN on four house price datasets. To improve readability, only the first 10 experimental results from the test data are shown. In the Boston and Ca-Bay datasets, the house prices predicted by IGTO-BPNN highly match the true values. Although the predicted values of IGTO-BPNN in the first ten test data in Ca-Land and Taiwan datasets have some deviation from the true values, IGTO-BPNN still achieves the best results in terms of evaluation metrics.

5.2. Qualitative analysis

5.2.1. Exploration and exploitation.

In swarm intelligence algorithms, two phases, search and exploitation are crucial. In the search phase, individuals of the population need to traverse the solution set space as much as possible to find better solutions in the unknown space. The development phase, on the other hand, focuses on the known space and searches within the neighborhood of the current solution, aiming to find potential better solutions. Keeping a balance between the search and development phases can not only help the algorithm converge to the optimal solution quickly and improve the solution efficiency, but also allow the algorithm to show good adaptability and robustness when solving various types of optimization problems. Therefore, an excellent SI algorithm should achieve a good balance between the search and development phases. In this paper, the IGTO algorithm is used to optimize the weights and biases of the BP neural network, followed by the prediction of the four house price datasets. The calculation of the percentages of the search and development, respectively, using Eq. 26, as a way to assess how well the algorithm balances these two aspects.

(26)

In Eq. 26, D is the variable dimension of the optimization problem and Nall is the number of populations. is the d-th dimension of the i-th population individual. With Eq. 26, the percentage of the search and development phases of the IGTO algorithm is calculated, as shown in Fig 12.

Fig 12 visualizes the balance between the search and exploitation phases when the IGTO algorithm optimizes the weights and biases of the BP neural network. The intersection of search and exploitation in the IGTO algorithm is generally in the middle of the iteration. At the beginning of the iteration, the population requires a higher search ratio to fully explore the solution set space; then at the middle of the iteration, it gradually enters the exploitation phase. And in the late iteration, the development ratio of IGTO is higher, which helps to improve the convergence accuracy and solution speed of the optimization problem. It should be pointed out that the GTO algorithm has localized development at the beginning of iteration in Boston and Ca – Land datasets; in Ca – Bay dataset, it oscillates back and forth between the search and development phases, which is prone to waste of computational resources; and in Taiwan dataset, the search phase consumes too much time, and there is a problem of slow convergence. It can be seen that this paper adopts the fitness allocation strategy, the Cauchy perturbation strategy and the elite evolution strategy to improve the GTO algorithm, which is effective and achieves an even balance between the search and development phases.

5.2.2. Ablation experiment.

This paper introduces three enhanced strategies to the GTO algorithm: (1) the fitness allocation strategy is employed to dynamically adjust the population positions, ensuring diversity among individuals; (2) the Cauchy variation strategy is applied to prevent the algorithm from converging to finite optimal solutions; (3) the elite evolution mechanism is introduced to evolve elite individuals and eliminate weaker ones, enhancing the algorithm’s global search capability. Ablation experiments are conducted to assess the impact of these three strategies on the performance of the IGTO-BPNN model. IGTO1-BPNN refers to using only strategy 1, IGTO2-BPNN refers to using only strategy 2, IGTO23-BPNN refers to using both strategy 2 and 3, and so on. Tables 9–12 present the comparison indices for each ablation experiment.

On all four datasets (Boston, Ca-Bay, Ca-Land, and Taiwan), IGTO-BPNN shows excellent performance. Specifically, on the Boston dataset, IGTO-BPNN performs best in all metrics (MAE 2.2013, RMSE 3.2023, R2 0.8881) under all strategies. On the Ca-Bay dataset, IGTO-BPNN and IGTO23-BPNN incorporating several enhancement strategies performed close to each other, with the former improving in R2. For the Ca-Land dataset, IGTO-BPNN performs better in terms of overall accuracy, especially in terms of SMAPE values, and the performance difference is not significant, although IGTO23-BPNN is able to slightly improve R2. On the other hand, on the Taiwan dataset, IGTO-BPNN performs better in MAE, RMSE, and SMAPE, showing its stability and accuracy, and the overall effect is not significantly different from that of IGTO-BPNN, despite the fact that IGTO23-BPNN improves R2. Meanwhile, the size of SD value can reflect the stability of the algorithms in the ablation experiments. The SD of IGTO-BPNN is always ranked first, which indicates that the three strategies enhance each other to optimize their performance. The SD of the remaining control group still fluctuates and the value is smaller than that of IGTO-BPNN. The running time can directly reflect the solving efficiency of the model. Compared with the original GTO-BPNN model, the method in this paper can both enhance the network performance and guarantee the solving speed. The table reveals the following observations:

  1. 1). Using only strategies ①, ②, or ③ results in a slight improvement in the IGTO-BPNN model’s performance.
  2. 2). Employing strategies ①② or ①③ together does not yield as significant an improvement as strategy ②③.
  3. 3). The combination of all three strategies, ①②③, leads to the best model performance, thus supporting the proposed IGTO-BPNN model.

Fig 13 shows the ranking graphs of the evaluation metrics in Tables 9–12, which shows the improvement effect of the three strategies on the GTO algorithm, with IGTO-BPNN having the best ranking.

thumbnail
Fig 13. Ranking chart of evaluation metrics for ablation experiments.

https://doi.org/10.1371/journal.pone.0332439.g013

5.3. Comparison with machine learning models

This section evaluates the performance of the IGTO-BPNN model in house price prediction by comparing it with other classical machine learning models. Four machine learning models, LSTM, ELM, RBF, and CNN, are used in the experiments. The evaluation indexes of different machine learning prediction models are reported in Tables 13–16. The CNN model continues to exhibit strong performance in both prediction results and evaluation metrics, surpassing the performance of BPNN optimized by other intelligent algorithms.

Fig 14 shows the ranking result graphs in Tables 1316. Compared with the other four machine learning models, IGTO-BPNN gets 18 first places in the evaluation metrics, while CNN only gets 8 first places, which shows that IGTO-BPNN is competitive in house price prediction.

The IGTO-BPNN outperforms the other models in the Boston dataset (Table 13) in terms of MAE (2.2013), MAPE (0.1145), R2 (0.8881), and RMSE (3.2023), demonstrating excellent accuracy and stability. LSTM and CNN follow closely, though LSTM (MAE 2.5723, R2 0.8226) and CNN (MAE 2.2753, R2 0.8543) also perform well, but they are still slightly inferior to IGTO-BPNN in all the metrics. In the Ca-Bay dataset (Table 14), the MAPE (0.1512) and RMSE (3.3384) of IGTO-BPNN are lower than other models, and R2 (0.7346) is higher than most models, which demonstrates its excellent prediction performance. CNN model has the lowest MAE (2.8419), and R2 (0.7352) is not low but has no advantage over other models, and the overall performance is only second to IGTO-BPNN. In the Ca-Land dataset (Table 15), the advantage of IGTO-BPNN is obvious, and the advantage of RMSE (3.3879) is higher than other models. IGTO-BPNN has the best performance significantly better than LSTM, ELM, RBF and CNN models in terms of MAPE (0.1760) and R2(0.8075). The Taiwan dataset (Table 16), IGTO-BPNN dominates this dataset. Although the MAE (5.2275) of IGTO-BPNN is slightly higher, its RMSE (6.2697) and SMAPE (0.1393) are at the top of all the models and its R2 (0.6583) is slightly higher than the other models. The LSTM model has a MAE (5.3397), RMSE (8.2160) and SMAPE (0.1434) are on the high side, and the prediction effect is significantly less than that of IGTO-BPNN. When comparing IGTO-BPNN with CNN, (1) Although IGTO-BPNN achieves the highest comprehensive ranking, its indicators are only slightly better than CNN. For instance, in the Boston dataset, RMSE is 3.2023 for IGTO-BPNN and 3.2614 for CNN. (2) Moreover, CNN’s metrics are only slightly higher than those of IGTO-BPNN. For example, in the Ca-Land dataset, SMAPE is 0.1779 for CNN and 0.1848 for IGTO-BPNN. The IGTO-BPNN model demonstrates excellent performance in house price prediction and remains competitive when compared to classical machine learning models.

In the Boston and Ca-Bay datasets, CNN obtained the best SD twice; in the remaining datasets, LSTM performed optimally. In the four datasets, the IGTO-BPNN model did not obtain the optimal SD once, which suggests algorithmic volatility in the model. However, the IGTO-BPNN obtains four second-place finishes, and the gap with the optimal SD is always very small. CNN and LSTM for house price prediction require a large amount of runtime to obtain the optimal SD. In contrast, the method in this paper obtains a better prediction accuracy with less computational resources, which is rare. Figs 1518 show the real values and prediction outcomes of every model (showing only the first ten test data points), demonstrating that the IGTO-BPNN model outperforms the other models in prediction accuracy.

6. Conclusion

This paper proposes a novel method for house price prediction, using an improved Artificial Gorilla Troops Optimizer (IGTO) to enhance the conventional BP neural network. By refining the initial weights and biases, the IGTO-BPNN model achieves more accurate and efficient house price predictions. To evaluate the performance of the IGTO-BPNN model, two sets of control experiments are conducted. The first compares the IGTO-BPNN model with BPNN optimized by eleven different SI algorithms, including PSO, CMA-ES, SaDE, GWO, MFO, WOA, HHO, GTO, FDB_TLABC, WSO, EHO. The second comparison is made against four classical machine learning models: LSTM, ELM, RBF, and CNN. All the above models show the performance of house price prediction through five indicators: MAE, MAPE, R2, RMSE, SMAPE. In this paper, the standard deviation and running time are also counted, and experimental validation is carried out using four house price datasets. The experimental results show that the IGTO-BPNN model not only ensures the algorithm stability, but also has a faster solving efficiency in the house price prediction problem. Compared with the traditional BP neural network, the model improves 17.66%, 18.27%, 28.10%, 49.35% and 24.83% in five evaluation indexes, which is sufficiently competitive with machine learning techniques.

The IGTO-BPNN model proposed in this study has certain advantages in the problem of house price prediction. Economically, it can accurately judge the trend of house price for investors, reduce the risk, and promote the stability of the market and the economy; socially, it can help the government to formulate a reasonable housing policy, safeguard people’s livelihood, and promote harmony; technically, the improved strategies and optimized algorithms can provide researchers with new ideas, which can also be extended to other prediction problems and promote the development of technology. However, this study still has some limitations. (1) Only four specific public datasets are selected for the experiment, which cannot comprehensively cover the house prices in different regions, economic environments and market conditions around the world, which limits the generalizability of the research results. (2) In the experimental process, the impact of the unique characteristics of different datasets on the model performance is not fully considered. For example, the datasets may have uneven data distribution and different ways of handling missing values. (3) The experimental comparison group contains 11 SI-BPNNs and four machine learning techniques, which fails to cover all the representative advanced algorithms and models in the field. Some emerging algorithms and models with better performance may not be included in the comparison, making it difficult to comprehensively assess the relative advantages of the IGTO – BPNN model among many algorithms.

Future work can be advanced in the following aspects: (1) Collecting more house price datasets from different regions, economic levels and market types to improve dataset diversity and enhance the model’s generalization ability and generalizability. (2) Analyze the features of different datasets in depth to understand their uniqueness, select features in a targeted manner, and optimize data preprocessing methods and model parameters. (3) Pay attention to the latest achievements in the field, and include more representative advanced algorithms for comparison, such as deep learning-based optimization algorithms and novel swarm intelligence algorithms.

References

  1. 1. Zhan C, Liu Y, Wu Z, Zhao M, Chow TWS. A hybrid machine learning framework for forecasting house price. Expert Syst with Applications. 2023;233:120981.
  2. 2. Wang P, Ge C, Zhou Z, Wang X, Li Y, Wang Y. Joint Gated Co-attention Based Multi-modal Networks for Subregion House Price Prediction. IEEE Trans Knowl Data Eng. 2021;1–1.
  3. 3. Çılgın C, Gökçen H. A hybrid machine learning model architecture with clustering analysis and stacking ensemble for real estate price prediction. Comput Econ. 2024;66(1):127–78.
  4. 4. Duguleana C, Duguleana L, Baba CM, Drumea C. Recovery after demerger: evidence from romanian companies. Sustainability. 2022;14(3):1151.
  5. 5. Portugal I, Alencar P, Cowan D. The use of machine learning algorithms in recommender systems: A systematic review. Expert Systems with Applicat. 2018;97:205–27.
  6. 6. Oladunni T, Sharma S, Tiwang R. A Spatio - Temporal Hedonic House Regression Model. In: 16th IEEE International Conference on Machine Learning and Applications (ICMLA). Cancun, MEXICO; 2017;607–12.
  7. 7. Ling Y. Time, space and hedonic prediction accuracy: evidence from Corsican apartment markets. Ann Reg Sci. 2019;64(2):367–88.
  8. 8. Xu X, Zhang Y. Residential housing price index forecasting via neural networks. Neural Comput & Applic. 2022;34(17):14763–76.
  9. 9. CHEN J-H, ONG CF, ZHENG L, HSU S-C. Forecasting spatial dynamics of the housing market using support vector machine. Int J Strategic Property Manag. 2017;21(3):273–83.
  10. 10. Han E-J, Chun S-H. A Long short-term memory model using kernel density estimation for forecasting apartment prices in Seoul City. Expert Systems with Applicat. 2025;283:127748.
  11. 11. Doush IA, Ahmed B, Awadallah MA, Al-Betar MA, Alawad NA. Improving multilayer perceptron neural network using two enhanced moth-flame optimizers to forecast iron ore prices. J Intelligent Syst. 2024;33(1).
  12. 12. Zhu TL, Yang YK, Bao S, Raza H. House price prediction using XG-Boost grid search and cross-validation methods. In: 12th International Conference on Mathematical Modeling in Physics (IC-MSQUARE). Belgrade, SERBIA; 2023;637–47.
  13. 13. Mostofi F, Toğan V, Başağa HB, Çıtıpıtıoğlu A, Tokdemir OB. Multiedge Graph Convolutional Network for House Price Prediction. J Constr Eng Manage. 2023;149(11).
  14. 14. Abu-Doush I, Ahmed B, Awadallah MA, Al-Betar MA, Rababaah AR. Enhancing multilayer perceptron neural network using archive-based harris hawks optimizer to predict gold prices. Journal of King Saud University - Computer and Information Sciences. 2023;35(5):101557.
  15. 15. Xu W, Liu A, Zhang Y, Lau V. Bayesian deep learning via expectation maximization and turbo deep approximate message passing. IEEE Trans Signal Process. 2024;72:3865–78.
  16. 16. Li RQ, Hu JH, Ieee. Prediction Of Housing Price Along The Urban Rail Transit Line Based On GA-BP Model And Accessibility, in: IEEE 5th International Conference on Intelligent Transportation Engineering (ICITE), Beijing, PEOPLES R CHINA, 2020; pp. 487–92.
  17. 17. Zhao XM, Liu XW, Cao XS. Research on real estate appraisal method based on feature engineering and BP neural network. In: 2nd International Conference on Artificial Intelligence and Information Systems (ICAIIS). Chongqing, PEOPLES R CHINA; 2021.
  18. 18. Wan P, Mu Y, Xue W, Li Q, Tao T, Zhang W. Feedforward Neural Network Based on Nonmonotone Conjugate Gradient Method for Multiple Classification. In: 2021 International Joint Conference on Neural Networks (IJCNN). 2021;1–8. https://doi.org/10.1109/ijcnn52387.2021.9534357
  19. 19. Liu X, Guo J, Wang H, Zhang F. Prediction of stock market index based on ISSA-BP neural network. Expert Systems with Applications. 2022;204:117604.
  20. 20. Al-Betar MA, Awadallah MA, Doush IA, Alomari OA, Abasi AK, Makhadmeh SN, et al. Boosting the training of neural networks through hybrid metaheuristics. Cluster Comput. 2022;26(3):1821–43.
  21. 21. Wang J, Zhao X, Wang L. Prediction of China’s carbon price based on the genetic algorithm–particle swarm optimization–back propagation neural network Model. Sustainability. 2024;17(1):59.
  22. 22. Wang Y, Shao J, Yang F, Zhu Q, Zuo M. Optimization design of centrifugal pump cavitation performance based on the improved BP neural network algorithm. Measurement. 2025;245:116553.
  23. 23. Eldeghady GS, Kamal HA, Hassan MAM. Fault diagnosis for PV system using a deep learning optimized via PSO heuristic combination technique. Electr Eng. 2023;105(4):2287–301.
  24. 24. He Z, Song Y, Guan H, Yu L. Predicting bridge condition index using an improved back-propagation neural network. Alexandria Engineering J. 2024;106:328–36.
  25. 25. Abdollahzadeh B, Soleimanian Gharehchopogh F, Mirjalili S. Artificial gorilla troops optimizer: A new nature‐inspired metaheuristic algorithm for global optimization problems. Int J Intell Syst. 2021;36(10):5887–958.
  26. 26. Ramadan A, Ebeed M, Kamel S, Agwa AM, Tostado-Véliz M. The Probabilistic Optimal Integration of Renewable Distributed Generators Considering the Time-Varying Load Based on an Artificial Gorilla Troops Optimizer. Energies. 2022;15(4):1302.
  27. 27. Asaad A, Kassem AM, Ali A, Mahmoud K, Shaaban MF, Lehtonen M, et al. Optimal planning of multi-type renewable energy resources and electric vehicle charging stations under resilient charging tariff using Gorilla Troops optimizer. J Energy Storage. 2024;98:112908.
  28. 28. Rihan M, Sayed A, Abdel-Rahman AB, Ebeed M, Alghamdi TAH, Salama HS. An artificial gorilla troops optimizer for stochastic unit commitment problem solution incorporating solar, wind, and load uncertainties. PLoS One. 2024;19(7):e0305329. pmid:38985844
  29. 29. Murugan S, Jaishankar M, Premkumar K. Hybrid DC–AC Microgrid Energy Management System Using an Artificial Gorilla Troops Optimizer Optimized Neural Network. Energies. 2022;15(21):8187.
  30. 30. Konakoglu B, Kutlu Onay F, Aydemir SB. Tropospheric zenith wet delay prediction with a new hybrid ANN – Gorilla troops optimizer algorithm. Adv Space Res. 2023;71(11):4739–50.
  31. 31. Wang B, Wang X, Wang N, Javaheri Z, Moghadamnejad N, Abedi M. Machine learning optimization model for reducing the electricity loads in residential energy forecasting. Sustainable Computing: Informatics and Systems. 2023;38:100876.
  32. 32. Lin H. GoogleNet transfer learning with improved gorilla optimized kernel extreme learning machine for accurate detection of asphalt pavement cracks. Structural Health Monitoring. 2024;23(5):2853–68.
  33. 33. Duman S, Kahraman HT, Sonmez Y, Guvenc U, Kati M, Aras S. A powerful meta-heuristic search algorithm for solving global optimization and real-world solar photovoltaic parameter estimation problems. Engineering Applications of Artificial Intelligence. 2022;111:104763.
  34. 34. Kennedy J, Eberhart R. Particle swarm optimization. In: Proceedings of ICNN’95 - International Conference on Neural Networks. 1942–8. https://doi.org/10.1109/icnn.1995.488968
  35. 35. Qin AK, Suganthan PN. Self-adaptive Differential Evolution Algorithm for Numerical Optimization. In: 2005 IEEE Congress on Evolutionary Computation. 2005;1785–91. https://doi.org/10.1109/cec.2005.1554904
  36. 36. Mirjalili S, Mirjalili SM, Lewis A. Grey Wolf Optimizer. Advances in Engineering Software. 2014;69:46–61.
  37. 37. Mirjalili S. Moth-flame optimization algorithm: A novel nature-inspired heuristic paradigm. Knowledge-Based Systems. 2015;89:228–49.
  38. 38. Mirjalili S, Lewis A. The Whale Optimization Algorithm. Advances in Engineering Software. 2016;95:51–67.
  39. 39. Heidari AA, Mirjalili S, Faris H, Aljarah I, Mafarja M, Chen H. Harris hawks optimization: Algorithm and applications. Future Generation Computer Systems. 2019;97:849–72.
  40. 40. Hansen N, Müller SD, Koumoutsakos P. Reducing the time complexity of the derandomized evolution strategy with covariance matrix adaptation (CMA-ES). Evol Comput. 2003;11(1):1–18. pmid:12804094
  41. 41. Braik M, Hammouri A, Atwan J, Al-Betar MA, Awadallah MA. White Shark Optimizer: A novel bio-inspired meta-heuristic algorithm for global optimization problems. Knowledge-Based Systems. 2022;243:108457.
  42. 42. Al-Betar MA, Awadallah MA, Braik MS, Makhadmeh S, Doush IA. Elk herd optimizer: a novel nature-inspired metaheuristic algorithm. Artif Intell Rev. 2024;57(3).
  43. 43. Zhang H, Razmjooy N. Optimal Elman Neural Network based on Improved Gorilla Troops Optimizer for Short-Term Electricity Price Prediction. J Electr Eng Technol. 2023;19(1):161–75.
  44. 44. Mostafa RR, Gaheen MA, Abd ElAziz M, Al-Betar MA, Ewees AA. An improved gorilla troops optimizer for global optimization problems and feature selection. Knowledge-Based Systems. 2023;269:110462.
  45. 45. Cai J, Yang H, Lai T, Xu K. Parallel pump and chiller system optimization method for minimizing energy consumption based on a novel multi-objective gorilla troops optimizer. J Building Engineering. 2023;76:107366.
  46. 46. Wolpert DH, Macready WG. No free lunch theorems for optimization. IEEE Trans Evol Computat. 1997;1(1):67–82.
  47. 47. Li K, Huang H, Fu S, Ma C, Fan Q, Zhu Y. A multi-strategy enhanced northern goshawk optimization algorithm for global optimization and engineering design problems. Computer Methods in Applied Mechanics and Engineering. 2023;415:116199.
  48. 48. Fu S, Huang H, Ma C, Wei J, Li Y, Fu Y. Improved dwarf mongoose optimization algorithm using novel nonlinear control and exploration strategies. Expert Systems with Applications. 2023;233:120904.
  49. 49. Chen H, Wang M, Zhao X. A multi-strategy enhanced sine cosine algorithm for global optimization and constrained practical engineering problems. Applied Mathematics Computation. 2020;369:124872.
  50. 50. Wang GG, Deb S, Coelho LDS. Earthworm optimisation algorithm: a bio-inspired metaheuristic algorithm for global optimisation problems. IJBIC. 2018;12(1):1.
  51. 51. Li Z, Liu F, Yang W, Peng S, Zhou J. A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects. IEEE Trans Neural Netw Learn Syst. 2022;33(12):6999–7019. pmid:34111009
  52. 52. Huang G, Huang G-B, Song S, You K. Trends in extreme learning machines: a review. Neural Netw. 2015;61:32–48. pmid:25462632
  53. 53. Van Houdt G, Mosquera C, Nápoles G. A review on the long short-term memory model. Artif Intell Rev. 2020;53(8):5929–55.
  54. 54. Narendra KG, Sood VK, Khorasani K, Patel R. Application of a radial basis function (RBF) neural network for fault diagnosis in a HVDC system. IEEE Trans Power Syst. 1998;13(1):177–83.
  55. 55. Harrison D Jr, Rubinfeld DL. Hedonic housing prices and the demand for clean air. Journal of Environmental Economics and Management. 1978;5(1):81–102.
  56. 56. Pace RK, Barry R. Sparse spatial autoregressions. Statistics & Probability Letters. 1996.
  57. 57. Yeh I-C, Hsu T-K. Building real estate valuation models with comparative approach through case-based reasoning. Applied Soft Computing. 2018;65:260–71.
  58. 58. Zhou Y, Ma L, Ni W, Yu C. Data Enrichment as a Method of Data Preprocessing to Enhance Short-Term Wind Power Forecasting. Energies. 2023;16(5):2094.
  59. 59. Viverit L, Heo CY, Pereira LN, Tiana G. Application of machine learning to cluster hotel booking curves for hotel demand forecasting. Int J Hospitality Manag. 2023;111:103455.
  60. 60. Li S, Wang J, Zhang H, Liang Y. Short-term load forecasting system based on sliding fuzzy granulation and equilibrium optimizer. Appl Intell (Dordr). 2023;1–35. pmid:37363386