Real estate evaluation method based on Bayesian optimization and machine learning
Through Bayesian optimization and machine learning technology, a real estate valuation model is constructed, which solves the problems of complex and opaque existing real estate valuation methods, and realizes efficient and accurate real estate evaluation, which is suitable for large-scale data processing.
Patent Information
- Application Number
- CN202411306851.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-03
AI Technical Summary
The existing property valuation methods are complex and opaque, which can easily lead to unfairness and controversy. The traditional methods are unsatisfactory in terms of accuracy and efficiency, making it difficult to accurately process large-scale data.
Using the property valuation method based on Bayesian optimization and machine learning, the property valuation model is constructed by collecting and preprocessing data, using the XGBoost algorithm to optimize hyperparameters, and building a property valuation index system, combining buildings and neighborhoods and location factors are evaluated.
It significantly improves the accuracy and efficiency of real estate valuation, avoids overfitting, and provides a scientific and accurate evaluation method suitable for large-scale data processing, reduces the amount of calculation and improves model performance.
Smart Images

Figure CN119250848A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of real estate valuation, relates to machine learning technology, and specifically relates to a real estate valuation method based on Bayesian optimization and machine learning. Background Art
[0002] The proportion of second-hand housing transactions in the market is gradually increasing. Compared with new housing transactions, the second-hand housing transaction process is more complicated, and the information asymmetry between buyers and sellers is more prominent. These characteristics have led to disputes in second-hand housing transactions and provided opportunities for malicious housing speculation. Whether it is the taxation of existing housing transactions or the formulation of reference prices for second-hand housing transactions, it requires efficient and reasonable evaluation of large-scale real estate in a short period of time.
[0003] Specifically, the background of the real estate appraisal system involves multiple fields such as taxation, real estate market and technological development. However, the real estate valuation and tax assessment process is usually complicated and opaque, and the valuation is too subjective or based on limited data, which can easily lead to unfairness and disputes.
[0004] Secondly, the trend of housing prices is not linear. It is affected by many factors, including economic conditions, policy adjustments, market supply and demand, etc. It is the result of the balance between demand and supply in the real estate transaction market and is difficult to accurately estimate;
[0005] Finally, most current real estate valuation studies use traditional valuation methods, which are less than satisfactory in terms of accuracy and low efficiency in processing large-scale data.
[0006] In this context, it is necessary to provide a machine learning algorithm to make accurate and scientific valuation of real estate to solve the above problems. Summary of the invention
[0007] Purpose of the invention: In order to overcome the deficiencies in the prior art, a real estate valuation method based on Bayesian optimization and machine learning is provided.
[0008] Technical solution: To achieve the above purpose, the present invention provides a real estate valuation method based on Bayesian optimization and machine learning, comprising the following steps:
[0009] S1: Collect relevant data on existing housing transactions published on the Internet and build a real estate valuation index system;
[0010] S2: preprocess the collected data;
[0011] S3: Use feature engineering to convert each feature variable in the preprocessed data into trainable data, generate a modeling sample set, and divide the data into a test set and a training set;
[0012] S4: Normalize the data and perform dimensionless normalization on the original data through the standardized formula;
[0013] S5: Build a real estate valuation model based on the XGBoost algorithm in machine learning;
[0014] S6: Use the Bayesian optimization algorithm to optimize the hyperparameters of the real estate valuation model and find the optimal hyperparameter combination;
[0015] S7: training the property valuation model optimized in step S6 using the training set, and testing it using the test set;
[0016] S8: Based on the basic information of the house, the house valuation model is trained and tested to output the assessed price of the house.
[0017] Furthermore, in step S1, the real estate valuation index system is constructed according to building factors, neighborhood factors, and location factors, wherein the variables of building factors include building area, room, floor, orientation, decoration, elevator, building type, transaction price, house age, total number of houses, total number of buildings, water usage type, and electricity usage type; the variables of neighborhood factors include floor area ratio, property management fee, and greening rate; and the variables of location factors include subway, longitude, and latitude.
[0018] Furthermore, the preprocessing in step S2 includes data cleaning, missing value and outlier processing.
[0019] Furthermore, the processing of each characteristic variable in the data in step S3 includes quantification of quantitative variables, quantification of virtual variables and graded assignment.
[0020] Furthermore, the normalization in step S4 refers to scaling the data to a certain interval according to a certain ratio, thereby accelerating the speed of model convergence and improving the accuracy of classification results. The present invention uses Z-Score normalization, which is data normalization based on the mean and standard deviation of the original data. The original data of the attribute is normalized by Z-score. Z-score normalization is applicable to the case where the maximum or minimum value of the attribute is unknown, or there is discrete data that exceeds the value range. The formula for Z-Score normalization is:
[0021]
[0022] Where X is the feature original data, Y is the normalized data, μ is the mean value of the original data, and σ is the standard deviation of the original data.
[0023] Furthermore, the XGBoost real estate valuation model in step S5 is a typical supervised additive linear combination model based on the idea of integration, in which each base learner adopts a regression tree, and its training form is to optimize the base learners one by one using a forward step-by-step algorithm. When the model is trained to the tth regression tree, it is necessary to fit the residual formed by the classification regression prediction of the training samples by the first t-1 trees. In this way, a new tree will be added on the basis of the original model, and each time a tree is added that minimizes the objective function value. Unlike GBDT, the objective function of the XGBoost model iteration not only includes the common loss function, but also considers the complexity of the model, which is represented by a regularization term.
[0024] The construction of the real estate valuation model in the present invention specifically includes:
[0025] A1: Initialize a simple basic model (a tree) and use it as the initial prediction value; this initial model can be a constant or a simple linear model;
[0026] A2: Calculate the gradient and Hessian matrix of each sample based on the loss function. Real estate valuation is a regression problem, and the commonly used loss function is the square loss function.
[0027] A3: The tree model is gradually constructed through the gradient boosting algorithm. In each iteration, a new tree is constructed to fit the residual of the previous model.
[0028] A4: Find the best split point: For each node, traverse all possible split points to find the split point that can minimize the loss function;
[0029] In the present invention, XGBoost uses a greedy algorithm to search for the best segmentation point and quickly determines the candidate segmentation point through the quantile points of the features;
[0030] A5: To prevent overfitting, a pruning strategy is used to limit the complexity of the tree by controlling hyperparameters such as the maximum depth of the tree and the minimum number of samples of leaf nodes.
[0031] A6: Update the prediction value of the leaf node and calculate the prediction value of the sample on each leaf node. The update of the prediction value will take into account factors such as the learning rate to control the influence of each tree on the final prediction result.
[0032] A7: After each round of iteration, the tree structure is regularized, including pruning and adjusting the weights of leaf nodes, to reduce the complexity of the model and prevent overfitting.
[0033] A8: Iterative training repeats the above steps until the preset number of iterations is reached or the loss function converges; in each round of iteration, the newly constructed tree model is added to the previous model to gradually improve the model's predictive ability.
[0034] Furthermore, the Bayesian optimization in step S6 is an approximate method, which is a very effective method in global optimization. It learns the shape of the objective function and finds a parameter group that enables the objective function to be improved to the global optimal value.
[0035] Specifically, the optimal hyperparameter combination is found as follows: assume that the objective function obeys a prior distribution, define an acquisition function, and then, each time a new sample point is used to test the objective function, use the information obtained to update the prior distribution of the objective function, and then use the acquisition function to determine the next sampling point, and finally obtain the posterior distribution of the objective function. The point where the posterior distribution reaches its maximum value is the optimal parameter group being found.
[0036] Furthermore, the specific steps of finding the optimal hyperparameter combination in step S6 are as follows:
[0037] B1: Define hyperparameter space: Determine the hyperparameters and search range of the real estate valuation model; hyperparameters include learning rate, maximum tree depth, subsample ratio, column sampling ratio, etc.
[0038] B2: Select evaluation metrics: Determine the optimized evaluation metrics, including accuracy, mean square error (MSE) or log loss, and adjust the hyperparameters accordingly;
[0039] B3: Initialize the Bayesian optimizer: Use a suitable Bayesian optimization library to initialize the optimizer and pass in the defined hyperparameter space;
[0040] B4: Define the evaluation function: Create an evaluation function that accepts hyperparameters as input and returns the cross-validated evaluation metric results; in each call, the Bayesian optimizer adjusts the parameters for the next attempt based on the results provided by the current hyperparameters;
[0041] B5: Execute the Bayesian optimization process: Execute the optimization process and let the optimizer iteratively explore the hyperparameter space; the optimizer will choose the next parameter combination to try based on the previous evaluation results to maximize (or minimize, depending on the evaluation metric) the value of the objective function;
[0042] B6: Get the best parameters: After the optimization is completed, get the best hyperparameter combination and its corresponding evaluation index value.
[0043] The design principle of the method of the present invention is: the present invention constructs a complete set of real estate valuation index system based on housing location factors, neighborhood factors and architectural factors, including the quantification method of each index. Then, the XGBoost model is used as a benchmark, and the Bayesian optimization algorithm is used to find the optimal hyperparameter combination, which effectively reduces the amount of calculation and significantly improves the model performance. At the same time, combined with the LightGBM model and the random forest model, the advantages of the XGBoost model in real estate valuation are verified through experiments. Finally, the real estate valuation model is applied to the system platform to output the evaluation price for both buyers and sellers.
[0044] Beneficial effects: Compared with the prior art, the present invention can scientifically and accurately evaluate the value of a house by combining the construction of a real estate valuation index system, the construction of a real estate valuation model, and the Bayesian optimization of hyperparameters. It has the following advantages:
[0045] 1. Taking full advantage of the XGBoost algorithm, XGBoost has excellent generalization ability and prediction accuracy in the field of real estate valuation. XGBoost can handle complex real estate market data characteristics, has strong anti-overfitting ability, fast speed, and improves data processing efficiency.
[0046] 2. Compared with traditional grid search or random search methods, the Bayesian optimization algorithm is more computationally efficient and highly adaptable. It supports both continuous and discrete parameters, making it more flexible when adjusting the complex parameters of the XGBoost model. It can more effectively avoid falling into local optimal solutions, which is especially important for optimizing complex XGBoost model parameters, and improves the model's accuracy in real estate valuation.
[0047] 3. The real estate valuation model of the present invention can be applied to the platform and can be maintained, which has practical significance and creates social value. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0049] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0050] like Figure 1 As shown, the present invention provides a real estate valuation method based on Bayesian optimization and machine learning, comprising the following steps:
[0051] S1: Collect relevant data on existing housing transactions published on the Internet and build a real estate valuation index system:
[0052] Identify appropriate online platforms or data providers to obtain data related to existing housing transactions; ensure the integrity and reliability of the data, including information such as house prices, geographic locations, and house attributes; use web crawler technology or API interfaces to capture existing housing transaction data from selected data sources; ensure the consistency of data formats, and integrate data from different sources into a unified data storage, such as a database or data warehouse.
[0053] This example uses the requests library and BeautifulSoup library in Python to crawl data from major real estate trading platforms. Obtain basic housing information (such as area, number of rooms, location), transaction price, transaction date and other data. Use web crawler technology or API interface to crawl existing housing transaction data from selected data sources. You can write Python scripts to call the APIs of these platforms to regularly obtain the latest house sales information. Make sure that the captured data includes the required fields, such as selling price, address, house type, area, etc., and ensure the consistency and integrity of the data. Integrate the data captured from different sources into a unified data storage, and you can choose to use a database (such as MySQL, PostgreSQL) or a data warehouse (such as Amazon Redshift, Google BigQuery).
[0054] When integrating data, it is necessary to ensure unified naming of fields and consistency of data formats to facilitate subsequent data analysis and application.
[0055] The real estate valuation index system is constructed based on building factors, neighborhood factors, and location factors, as shown in Table 1:
[0056] Table 1
[0057]
[0058] S2: Preprocess the collected data, including cleaning the data to remove duplicate data, processing missing values (filling or deleting), processing outliers (based on statistical analysis or domain knowledge), etc.
[0059] In this embodiment, a smart meter in a certain monitoring area uploads a data record containing abnormal voltage fluctuations. In the preprocessing stage, the integrity and rationality of the record are first checked. If the data is found to be beyond the normal range or inconsistent with other device data, it is marked as an abnormal value and corrected or eliminated;
[0060] S3: Use feature engineering to convert each feature variable in the preprocessed data into trainable data, generate a modeling sample set, and divide the data into a test set and a training set;
[0061] The processing of each characteristic variable in the data includes quantification of quantitative variables, quantification of virtual variables and graded assignment, as shown in Table 2:
[0062] Table 2
[0063]
[0064] S4: Normalize the data and perform dimensionless normalization on the original data through the standardized formula;
[0065] Use Z-Score normalization, which is based on the mean and standard deviation of the original data. The original data of the attribute is normalized by Z-score. Z-score normalization is applicable to situations where the maximum or minimum value of the attribute is unknown, or there is discrete data that exceeds the value range. The formula for Z-Score normalization is:
[0066]
[0067] Where X is the feature original data, Y is the normalized data, μ is the mean value of the original data, and σ is the standard deviation of the original data.
[0068] This embodiment uses MinMaxScaler or StandardScaler to perform feature normalization to ensure that each feature is at the same scale.
[0069] The dataset contains the following features:
[0070] Age: The age of the house, ranging from 0 to 100 years.
[0071] Area: The area of the house, ranging from 50 to 250 square meters.
[0072] Rating: The overall rating of the house, ranging from 1 to 10.
[0073] Before feature normalization, these features have different value ranges. For example, the value ranges of "age" and "area" are quite different, which may affect the performance of some machine learning algorithms. You can use MinMaxScaler to scale each feature to the range of [0,1] to ensure that all features are on the same numerical scale.
[0074] S5: Based on the XGBoost algorithm in machine learning, build an XGBoost real estate valuation model;
[0075] The XGBoost real estate valuation model is a typical supervised additive linear combination model based on the idea of integration. Each base learner in it adopts a regression tree. Its training form is to optimize the base learners one by one using a forward step-by-step algorithm. When the model is trained to the tth regression tree, it is necessary to fit the residual formed by the classification regression prediction of the training samples by the first t-1 trees. In this way, a new tree will be added on the basis of the original model. Each time, a tree is added that minimizes the objective function value. Unlike GBDT, the objective function of the XGBoost model iteration not only includes the common loss function, but also considers the complexity of the model, which is represented by the regularization term.
[0076] The construction of the XGBoost real estate valuation model in the present invention specifically includes:
[0077] A1: Initialize a simple basic model (a tree) and use it as the initial prediction value; A2: Calculate the gradient and Hessian matrix of each sample according to the loss function. A sample is a piece of data in the data set. Real estate valuation is a regression problem, and the commonly used loss function is the square loss function.
[0078] The formula for the squared loss function is: Where y is the actual value, is the predicted value;
[0079] The gradient is the inverse of the loss function relative to the model prediction value. For sample i, the gradient calculation formula is: The formula for the Hessian matrix is: Under the squared loss function, this value is a constant 1.
[0080] A3: The tree model is gradually constructed through the gradient boosting algorithm. In each iteration, a new tree is constructed to fit the residual of the previous model.
[0081] The residual is the difference between the predicted value of the sample by the current model and the actual value;
[0082] The fitting process is to build a new tree so that the predicted value of this tree is as close to the residual as possible, and then add the predicted value of the new tree to the current model to update the model's prediction. The new model formula is: Where η is the learning rate, Tree new (i) is the predicted value of the new tree for sample i;
[0083] A4: Find the best split point: For each node, find the point that can minimize the loss function by traversing all possible split points;
[0084] In the present invention, XGBoost uses a greedy algorithm to search for the best segmentation point and quickly determines the candidate segmentation point through the quantile points of the features;
[0085] For a given feature j and split point t, the gain is calculated as Where L and R are the left and right subsets of the split point t; S is the sample set of the current node; g i and h i are the gradient and Hessian matrix of the i-th sample respectively; λ and γ are regularization parameters.
[0086] A5: Use pruning strategies to prevent overfitting and limit the complexity of the tree by controlling hyperparameters such as the maximum depth of the tree and the minimum number of samples of leaf nodes.
[0087] A6: Update the prediction value of leaf nodes: Calculate the prediction value of each sample on each leaf node. The update of the prediction value will take into account factors such as the learning rate to control the influence of each tree on the final prediction result.
[0088] The prediction value formula of leaf node j is: where g j is the sum of the gradient values of the samples at the node; h j is the Hessian sum of the samples at the node; λ is the regularization parameter used to prevent overfitting.
[0089] Update: Update the value of each leaf node in the existing model based on the predicted value of the leaf node of the new tree. This is done by weighted averaging, multiplying the predicted value of the new tree by the learning rate η.
[0090] Each update will affect the final prediction result, thereby realizing the influence of the control tree on the final result.
[0091] A7: After each round of iteration, the tree structure is regularized, including pruning and adjusting the weights of leaf nodes, to reduce the complexity of the model and prevent overfitting.
[0092] A8: Iterative training repeats the above steps until the preset number of iterations is reached or the loss function converges; in each round of iteration, the newly constructed tree model is added to the previous model to gradually improve the model's predictive ability.
[0093] In this embodiment, the XGBoost library in Python is used to set the XGBoost model parameters (such as learning rate, tree depth, leaf node weight, etc.) to optimize the training effect and generalization ability of the model. The normalized data set is divided into a training set and a test set for model training and evaluation.
[0094] First, there is an example dataset containing multiple feature items. The dataset is divided into a training set and a test set, with the training set accounting for 80% and the test set accounting for 20%. Then set the parameters of the XGBoost model, such as learning rate, tree depth, subsampling ratio, etc. Use the xgb.train function to train the model and use the trained model for prediction. Finally, calculate the evaluation index (mean square error) to evaluate the prediction performance of the model.
[0095] S6: Use the Bayesian optimization algorithm to optimize the hyperparameters of the real estate valuation model and find the optimal hyperparameter combination;
[0096] Apply a Bayesian optimization algorithm (e.g., BayesianOptimization) to automatically search for the optimal XGBoost model hyperparameter combination. Set the search space for hyperparameters and the optimization goal, such as model accuracy or training efficiency. This approach can significantly improve the performance of the model, avoiding the tedious process of manually adjusting hyperparameters while ensuring that the optimal solution is found within the given search space.
[0097] This embodiment takes maximizing cross-validation accuracy as an example. Bayesian optimization implementation process: First, write an objective function that receives the hyperparameters of XGBoost as input and returns the cross-validation accuracy as output. Use a Bayesian optimization algorithm (such as the BayesianOptimization package) to iteratively select the next most promising hyperparameter combination to obtain better cross-validation accuracy in the next round of evaluation. In each iteration, the next hyperparameter combination to be evaluated is selected based on the current results until a pre-set number of iterations or convergence conditions are reached. Ultimately, the algorithm will output the hyperparameter combination with the best cross-validation accuracy.
[0098] The specific steps to find the optimal hyperparameter combination are as follows:
[0099] B1: Define hyperparameter space: Determine the hyperparameters and search range of the real estate valuation model; hyperparameters include learning rate, maximum tree depth, subsample ratio, column sampling ratio, etc.
[0100] B2: Select evaluation metrics: Determine the optimized evaluation metrics, including accuracy, mean square error (MSE) or log loss, and adjust the hyperparameters accordingly;
[0101] B3: Initialize the Bayesian optimizer: Use a suitable Bayesian optimization library to initialize the optimizer and pass in the defined hyperparameter space;
[0102] B4: Define the evaluation function: Create an evaluation function that accepts hyperparameters as input and returns the cross-validated evaluation metric results; in each call, the Bayesian optimizer adjusts the parameters for the next attempt based on the results provided by the current hyperparameters;
[0103] Bayesian optimization is a minimization problem, that is, finding the parameter configuration that minimizes the objective function value, so the evaluation function returns a negative cross-validation score CVScore. The evaluation function is F = -CVScore.
[0104] B5: Execute the Bayesian optimization process: Execute the optimization process and let the optimizer iteratively explore the hyperparameter space; the optimizer will choose the next parameter combination to try based on the previous evaluation results to maximize (or minimize, depending on the evaluation metric) the value of the objective function;
[0105] B6: Get the best parameters: After the optimization is completed, get the best hyperparameter combination and its corresponding evaluation index value.
[0106] Each time different hyperparameter combinations are tested, the evaluation index values of these combinations (such as MSE, MAE, etc.) are calculated. The algorithm uses these indicators to evaluate the performance of the model and adjust the search direction of the hyperparameters. Ultimately, it will select the hyperparameter combination with the best evaluation index value.
[0107] S7: Train the optimized XGBoost real estate valuation model using the training set and test it using the test set;
[0108] In this example, the optimized XGBoost real estate valuation model is trained and compared with the random forest model, LightGBM model, and the unoptimized XGBoost real estate valuation model. The performance of different models in terms of prediction accuracy, computational efficiency, etc. is evaluated, and the most suitable model is selected as the final real estate valuation model.
[0109] In this embodiment, mean absolute error (MAE), mean relative error (MAPE), and root mean square error (RMSE) are used as indicators for evaluating the model effect. As shown in Table 3, it can be seen that the evaluation effect of the XGBoost model is relatively outstanding among the three, and the performance of the optimized XGBoost model provided by the present invention is improved.
[0110] Table 3
[0111]
[0112] S8: Integrate the real estate valuation model into the system platform, input the basic information of the house, and output the assessed price of the house through the real estate valuation model. The assessed price can be expressed as: is the assessed price of the house, and X is the input house features.
[0113] Integrate the selected property valuation model into the system platform to ensure the stability and reliability of the model in practical applications. Design system interfaces and data flows to receive and evaluate new data in real time, supporting user interaction and decision-making.
[0114] Integration into the system platform must be rigorously tested for stability and reliability. This includes testing the model's performance under different scenarios and input conditions to ensure that it can provide accurate valuation results in all situations. At the same time, the model's robustness needs to be tested to ensure that it can still operate effectively under data changes or abnormal conditions. After the model is deployed to the production environment, a monitoring mechanism needs to be established to continuously monitor its performance and behavior. This includes monitoring the model's input and output, detecting potential drift or performance degradation, and making timely corrections or retraining as needed.
Claims
1. A real estate valuation method based on Bayesian optimization and machine learning, characterized in that: The steps include: S1: Collect relevant data on existing housing transactions published on the Internet and build a real estate valuation index system; S2: preprocess the collected data; S3: Use feature engineering to convert each feature variable in the preprocessed data into trainable data, generate a modeling sample set, and divide the data into a test set and a training set; S4: Normalize the data and perform dimensionless normalization on the original data through the standardized formula; S5: Build a real estate valuation model based on the XGBoost algorithm in machine learning; S6: Use the Bayesian optimization algorithm to optimize the hyperparameters of the real estate valuation model and find the optimal hyperparameter combination; S7: training the property valuation model optimized in step S6 using the training set, and testing it using the test set; S8: Based on the basic information of the house, the house valuation model is trained and tested to output the assessed price of the house.
2. A real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: The real estate valuation index system in step S1 is constructed based on building factors, neighborhood factors, and location factors, wherein the variables of building factors include building area, room, floor, orientation, decoration, elevator, building type, transaction price, house age, total number of houses, total number of buildings, water type, and electricity type; the variables of neighborhood factors include floor area ratio, property fee, and greening rate; and the variables of location factors include subway, longitude, and latitude.
3. The real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: The preprocessing in step S2 includes data cleaning, missing value and outlier processing.
4. The real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: The processing of each characteristic variable in the data in step S3 includes quantification of quantitative variables, quantification of virtual variables and grading of values.
5. The real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: In step S4, Z-Score normalization is used, which is data normalization based on the mean and standard deviation of the original data. The original data of the attribute is normalized by Z-score. The formula of Z-Score normalization is: Where X is the feature original data, Y is the normalized data, μ is the mean value of the original data, and σ is the standard deviation of the original data.
6. The real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: The construction of the real estate valuation model in step S5 specifically includes: A1: Initialize a basic model and use it as the initial prediction value; A2: Calculate the gradient and Hessian matrix of each sample point according to the loss function; A3: The tree model is gradually constructed through the gradient boosting algorithm. In each iteration, a new tree is constructed to fit the residual of the previous model. A4: Find the best split point: For each node, traverse all possible split points to find the split point that can minimize the loss function; A5: Use pruning strategies to limit the complexity of the tree by controlling the tree's hyperparameters; A6: Update the predicted value of the leaf node and calculate the predicted value of the sample on each leaf node; A7: After each round of iteration, the tree structure is regularized. A8: Iterative training, repeat the above steps until the preset number of iterations is reached or the loss function converges.
7. A real estate valuation method based on Bayesian optimization and machine learning according to claim 6, characterized in that: In step A2: The formula for the squared loss function is: where y is the actual value, is the predicted value; The gradient is the inverse of the loss function relative to the model prediction value. For sample i, the gradient calculation formula is: The formula for the Hessian matrix is: Under the square loss function, this value is a constant of 1; In the step A4: a greedy algorithm is used to search for the best segmentation point, and a candidate segmentation point is quickly determined by the quantile point of the feature; For a given feature j and split point t, the gain is calculated as Where L and R are the left and right subsets of the split point t; S is the sample set of the current node; g i and h i are the gradient and Hessian matrix of the i-th sample respectively; λ and γ are regularization parameters.
8. The real estate valuation method based on Bayesian optimization and machine learning according to claim 6, characterized in that: In step A6: the prediction value formula of leaf node j is: where g j is the sum of the gradient values of the samples at the node; h j is the Hessian sum of the samples at the node; λ is the regularization parameter used to prevent overfitting; The update method is: according to the predicted value of the leaf node of the new tree, update the value of each leaf node in the existing model. This is achieved by weighted averaging, multiplying the predicted value of the new tree by the learning rate η.
9. The real estate valuation method based on Bayesian optimization and machine learning according to claim 1, characterized in that: The method for finding the optimal hyperparameter combination in step S6 is: assume that the objective function obeys a prior distribution, then define an acquisition function, and then, each time a new sample point is used to test the objective function, the information obtained is used to update the prior distribution of the objective function, and then the next sampling point is determined by the acquisition function, and finally the posterior distribution of the objective function is obtained, and the point where the posterior distribution reaches the maximum value is the optimal parameter group found.
10. A real estate valuation method based on Bayesian optimization and machine learning according to claim 9, characterized in that: The specific steps of finding the optimal hyperparameter combination in step S6 are as follows: B1: Define hyperparameter space: Determine the hyperparameters and search range of the real estate valuation model; B2: Select evaluation indicators: Determine the optimized evaluation indicators; B3: Initialize the Bayesian optimizer: Use a suitable Bayesian optimization library to initialize the optimizer and pass in the defined hyperparameter space; B4: Define the evaluation function: Create an evaluation function that accepts hyperparameters as input and returns the cross-validated evaluation indicator results; In each call, the Bayesian optimizer adjusts the parameters for the next attempt based on the results provided by the current hyperparameters; B5: Execute the Bayesian optimization process: Execute the optimization process and let the optimizer iteratively explore the hyperparameter space; B6: Get the best parameters: After the optimization is completed, get the best hyperparameter combination and its corresponding evaluation index value.
Citation Information
Cited By
Method for carrying out model parameter optimization on wave energy device model test error
CN119538751A
Lithium ion battery health state estimation method based on Bayesian optimization integrated model
CN122043289A
A lithium ion battery state of health estimation method based on bayesian optimization ensemble model
CN122043289B