# Marketing System Construction and Risk Analysis Based on Random Forest of Machine Learning

Authors: Kai Wang; Na Wang
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

This paper analyses the innovative marketing model of enterprises in the new era from the perspective of the characteristics of enterprises and the problems of innovative marketing strategies and puts forward solution strategies and suggestions to provide reference for enterprises to get faster and better development in the new era. Based on the connotation of credit in the random forest, this paper follows the principles of science, standardization, fairness, and objectivity, draws on various credit factor analysis methods and famous credit scoring systems (such as FICO and Sesame Credit), closely links with relevant government and enterprise policy documents, combines with the actual situation of enterprise market, and finally builds a credit factor from three aspects of enterprise market: foundation, marketing, and monopoly. The credit index system consists of 3 primary indicators, 10 secondary indicators, and 22 tertiary indicators.


---

## Body

## 1. Introduction

The marketing strategy of enterprises is difficult to attract the attention of market economy leaders, and people mistakenly believe that “sales and marketing” is marketing; the wrong understanding of the marketing strategy results in enterprises tending to lag behind in the marketing environment, compared with large enterprises, enterprises both from marketing channels; the quality of marketing personnel and marketing organisations is lagging behind large enterprises, and Chinese enterprises do not give sufficient consideration to the process of formulating and implementing activities and lack the ability to judge their economic strength and the amount of market resources they possess, making it difficult to formulate reasonable marketing strategy plans and achieve the desired results, to the extent that they suffer significant economic losses [1–4].Chinese companies do not conduct reasonable market research and do not have a scientific and effective understanding of marketing theory in the process of innovative marketing strategy activities, which makes it difficult to identify target customers and does not meet the need of customers. In the process of market analysis and research, the correct research plan and research model are not chosen, and the plan developed is lacking [5, 6].It is difficult to develop a sound marketing strategy based on the psychology of the consumer. A survey on the development of marketing strategies by taking into account one’s own resources and level of concern showed that in the three-year period from 2007 to 2019, about 17.8% of companies in China developed marketing strategies beyond the affordability of their own resources [7, 8]. In the process of implementation, this caused a decline of around 7% in the economic profit of the enterprises.To improve their competitive position in the market, enterprises need to constantly update their marketing concepts as a way to build a marketing strategy financial system and to focus on product quality and improve product service levels. As competition in the market becomes increasingly fierce, companies need to improve the uniqueness of their products, rather than relying solely on higher product prices to make profits. Therefore, enterprises should focus on improving the quality of products and packaging and improving brand influence and other aspects of investment efforts [9, 10].Enterprises should adjust their marketing strategies according to the changes in the market and actively expand sales channels, establish a good corporate image and brand influence, establish a perfect after-sales service platform, solve customer problems in a timely manner, understand customer needs, improve the shortcomings of their own products in a timely manner, and improve market competitiveness. Only by playing a good management role can enterprises make marketing work smoothly. Therefore, enterprises should develop reasonable strategic plans according to their own development and improve the management system, clarify the work content and job responsibilities of management staff, and build a sound financial system for marketing management [11].


## 2. Corporate Market Integrity Indicator System Construction

### 2.1. Stepwise Hierarchy of Indicator Systems

Based on the connotation of credit itself, this paper follows the principles of science, standardization, fairness, and objectivity, draws on various credit factor analysis methods and famous credit scoring systems (such as FICO and Sesame Credit), closely links with relevant government and enterprise policy documents, combines with the actual situation of enterprise market, and finally builds a credit index system comprising 3 primary indicators, 10 secondary indicators, and 22 tertiary indicators from the three aspects of enterprise market: foundation, marketing, and monopoly [12]. The credit index system consists of 3 primary indicators, 10 secondary indicators, and 22 tertiary indicators, as shown in Figure 1.Figure 1
Corporate market integrity indicator system.According to the recursive hierarchy of the enterprise market integrity index system in Figure1, the hierarchical model of the corresponding evaluation index is constructed, as shown in Table 1.Table 1
Hierarchical model of the integrity indicator system.
Primary indexLayer aSecondary indexFloor BTertiary indicatorsLayer CBasic indicatorsA1Legal retail objectB11The approved location is legalB12Legal business formB13Monopoly indexA2Integrity managementB21Law-abiding operation durationC211Illegal operationB22Illegal cigarette case valueC223Licensed operationB23Ordered to suspend businessC233Big data research and judgmentB24Alter or forge the tobacco monopoly licenseC241


### 2.2. Expert Judgment Matrix Aggregation Based on Group Decision-Making

After establishing the index system hierarchy model in Table1, we need to construct pairwise judgment matrices at different levels. In the pairwise judgment matrix, when we describe the importance of the i-th and j-th factors relative to a factor at the upper level, it is represented by the quantitative relative weight aij, and the value of aij is set with reference to the value in Table 2. Suppose there are n factors involved in the comparison; then, the paired judgment matrix is
(1)A=aijn×nTable 2
Table of factor relative importance calibration values.
Importance scaleMeaning (for the influence of the previous factor, the former is compared with the latter)1Equally important3Slightly important5Obviously important7Strongly important9Extremely important2, 4, 6, 8Intermediate value of the above judgmentReciprocal1/naji=1/aijand satisfies the following properties:aij>0;aji=1/aij;aii=1. The first property states that the pairwise judgement matrix is nonnegative; the second and third properties state that the pairwise judgement matrix is symmetric. Further, when the pairwise judgement matrix satisfies the equation: aij×ajk=aik, it is transferable. When all elements of a pairwise judgement matrix satisfy symmetry and transferability, the pairwise judgement matrix is said to be consistent [13].For the paired judgment matrixA, we use MATLAB to find its eigenvalues, obtain its maximum eigenvalue λmax, and then calculate the general indicator CI:
(2)CI=λmax−nn−1,where n is the order of matrix A. The random consistency index CR of the pairwise judgment matrix A is further calculated:
(3)CR=CIRI,where RI is a weighted evaluation indicator, the values of which are shown in Table3.Table 3
Weighted evaluation indicators for different orders.
Order123456789Calibration value000.520.891.121.241.321.401.45IfCR<0.1, the consistency of the pairwise judgement matrix A meets the requirements. Otherwise, the values of the elements in A need to be readjusted.Based on the principle of group decision-making, we selected dozens of senior professors and experts and conducted a questionnaire survey to determine the data in the pairwise judgement matrix [14, 15]. Based on the hierarchy of indicators in Table 1, 11 pairwise judgement matrices were constructed. The key to aggregate judgement matrices based on group decision-making is to find a suitable method to fuse the judgement matrices given by several different experts without losing the details given by each expert. The fusion method based on the aggregation of individual judgements is used to fuse several different judgement matrices given by each expert into an overall matrix, so that the matrix retains the details of each expert’s matrix and wipes out the bias of individual judgements; at the same time, as the geometric mean method has the advantages of maintaining the positive and reciprocal inverse of the matrix before and after the aggregation, consistency, and keeping the consensus of group members unchanged, the geometric mean method is chosen and based on it. The geometric mean method was chosen, and expert weights were added on top of it to make the results more reasonable [16, 17]. The expert weight is obtained by factorising the export matrices and quasi-semi-vectorising them to find their similarities and differences and then finding the export weight. The steps include the following:
(1)
Calculate the similarity of each judgement matrix. Since each expert involved in the decision has individual dynamics and may come from different fields, their expertise and research directions also differ; therefore, each expert should have its own weight vector for different indicators. A total ofm matrices Aii=1,2,⋯,m,vecAp, and vecAq are the derived vectors of the matrices Ap and Aq, respectively, with their angles denoted as αpq, given by m experts:(4)γpq=cosαpq=vecAp.vecAqvecAp.vecAq,where the value ofγpq represents the similarity of the expert matrices Ap and Aq and ranges from 0 to 1, with a value closer to 0 representing a lower similarity between the two experts’ decisions and vice versa. Let
(5)γk=∑p=1,q≠kmγpq.Then,λk represents the similarity of the k-th expert to the overall evaluation obtained by combining the m experts. Normalising this gives
(6)λk=γk∑k=1mγk.The resulting resultλk is the normalised result of the overall evaluation similarity between the k-th expert and the combined m experts, measured in the same way as λpq.
(2)
Calculate the degree of variation of each judgement matrix. Letbkj be the element below the main diagonal in the judgement matrix given by the k-th expert; then, we have(7)σk=∑j=1nn−1/2bkj−∑i=1mbki,whereσk represents the difference between the evaluation of the k-th expert and the overall evaluation of the m experts. This is normalised to give
(8)φk=σk∑k=1mσk,whereφk denotes the normalised degree of variation; the smaller the value, the greater the weight to be given by the corresponding expert [18].
(3)
The fusion of expert judgment matrices is carried out according to the similarity and difference of each expert matrix, which is given by(9)ωk=λk,∑i=1mλiφi=1,γk1−φi1−∑i=1mλiφλ,∑i=1mλiφi≠1,whereωk is the combined weight of the k-th expert.Fuse the full expert judgment matrix into a consensus judgment matrixS.
(10)S=sijn×n,wheresij is the i-th row and j-th column element of the consensus matrix, satisfying
(11)sij=1,i=j,∏k=1maijkωk1/∑k=1mωk,i≠j,whereaijk is the element in row i and column j of the pairwise judgment matrix Ak.


### 2.3. Calculation of Indicator Weights Based on Hierarchical Analysis

After obtaining the consensus judgment matrixS, we calculate the intralevel weights and overall weights of each indicator through hierarchical analysis, and the specific steps include the following:
(1)
Intralevel weight calculation. For the consensus judgment matrixS, like the aforementioned paired judgment matrix A, we use the SVD algorithm to obtain the maximum eigenvalue λmax and then calculate the general indicators CI and CR. When CR<0.1, the S matrix is considered to meet the consistency requirement [19, 20]. When the maximum eigenvalue λmax is obtained, the normalised eigenvector, i.e., the weight vector, can be obtained at the same time:(12)W=w1,w2,⋯,wnT.The weight vectorW, calculated here, corresponds to the aforementioned pairwise judgement matrix A and the aggregated consensus judgement matrix S. It is the intratier weight of the layer in which the indicator is located. We can thus obtain the intralayer weights of the indicators in Table 1 for layers A, B, and C.
(2)
Overall weight calculation. The hierarchical structure of the corporate market integrity indicator system shown in Table1 is relatively simple as there is no crossover between the indicators in the layersClearly, the overall weightsw′ for each indicator in tier A, B, and C in Table 1 are
(13)w′Ai=wAi,w′Bij=wBij×wAi,w′Cijk=wCijk×wBij×wAi.


### 2.4. Integrated Unit Price Forecasting Model

#### 2.4.1. Data Preprocessing

In corporate marketing projects, data relating to integrated unit prices are collected manually, with certain missing and outlier values. The premise of data modelling is to ensure the accuracy and completeness of the data, so data preprocessing is required. In this paper, a box-and-line diagram method is used to determine outliers and a linear filling method is used to deal with missing values. Figure2 shows the monthly average price of concrete C30 in a certain place from January 2016 to December 2019, and it is obvious that in May 2017, the price of concrete C30 was 520 RMB/m3, much higher than the rest of the monthly average price, which is an outlier [21, 22].Figure 2
Price of concrete C30.This anomaly determination is quantified using a box line diagram of(14)R=U−L,Ulim=U+1.5R,Llim=L−1.5R,whereU is the upper quartile of the data set, L is the lower quartile of the data set, Ulim is the upper bound, and Llim is the lower bound. The median and mean of the group are calculated and plotted on a box plot as shown in Figure 3, where “R” indicates the mean value; values above the upper bound or below the lower bound are considered outliers. The outliers can be treated as missing values, and the missing values are filled in a linear way. The concrete C30 price for May 2017 is filled with the average value of 353.8/m3 for April 2017 and June 2017 [23–25].Figure 3
Concrete C30 price box line diagram.


### 2.5. Predictive Model Based on the Random Forest Algorithm

Random forest is a decision tree based on an evaluator pocket integration algorithm. The construction process of the random forest model is shown in Figure4. The input capacity is N, and the features are M [26–29]. The samples are randomly drawn N times, one sample at a time, as a decision tree with samples at the nodes; m features are randomly selected (m≤M), and since the prediction of the integrated unit price is a regression problem, the nodes are usually split by variance or least squares fitting method until the nodes can no longer split to form a decision tree; when the tree is smaller than the set value, repeat the above steps to continue to build the decision tree until it reaches the set value, forming a forest. When the tree is smaller than the set value, the above steps are repeated until the set value is reached, forming a forest.Figure 4
Random forest model construction process.When used for integrated unit price prediction, new sample data is input and each decision tree in the forest is predicted separately, and the predicted mean of all decision trees will be used as the output prediction of the random forest model. When the model performs poorly, it means that the model is not generalised enough and the generalisation error is large. The generalisation error is influenced by the complexity of the model structure, which is either too complex or too simple, so the optimal model complexity needs to be determined through model tuning [30, 31].For a single decision tree in a random forest, the deeper the node splits, the more complex the tree model. The default decision tree parameters allow the tree to grow indefinitely until the stopping conditions are met, so the tree is generally prone to overfitting. The important influencing parameters used in this paper are shown in Table4.Table 4
Important parameters of the random forest model.
ParameterExplainImpact on model performanceN_estimatorsNumber of base evaluators. The default is 100It does not affect the complexity of a single tree, but too small is easy to underfit, and too large is easy to overfitMax_depthMaximum tree depth, default maximum depthMaximum depth, i.e., maximum complexity, reduces max_depth to reduce model complexityMin_samples_leafThe minimum number of leaf nodes is 1 by defaultThe default value is the highest complexity, increasing min_samples_leaf to reduce model complexityMin_samples_splitThe minimum number of samples required for internal node division is 2 by defaultThe default value is the highest complexity, increasing min_samples_split to reduce model complexityMax_featureThe maximum number of features is auto by default, and the total number of features is squaredThe default value is the intermediate complexity, reducing max_feature to reduce the complexity of the model; on the contrary, it increases the complexity of the model


## 2.1. Stepwise Hierarchy of Indicator Systems

Based on the connotation of credit itself, this paper follows the principles of science, standardization, fairness, and objectivity, draws on various credit factor analysis methods and famous credit scoring systems (such as FICO and Sesame Credit), closely links with relevant government and enterprise policy documents, combines with the actual situation of enterprise market, and finally builds a credit index system comprising 3 primary indicators, 10 secondary indicators, and 22 tertiary indicators from the three aspects of enterprise market: foundation, marketing, and monopoly [12]. The credit index system consists of 3 primary indicators, 10 secondary indicators, and 22 tertiary indicators, as shown in Figure 1.Figure 1
Corporate market integrity indicator system.According to the recursive hierarchy of the enterprise market integrity index system in Figure1, the hierarchical model of the corresponding evaluation index is constructed, as shown in Table 1.Table 1
Hierarchical model of the integrity indicator system.
Primary indexLayer aSecondary indexFloor BTertiary indicatorsLayer CBasic indicatorsA1Legal retail objectB11The approved location is legalB12Legal business formB13Monopoly indexA2Integrity managementB21Law-abiding operation durationC211Illegal operationB22Illegal cigarette case valueC223Licensed operationB23Ordered to suspend businessC233Big data research and judgmentB24Alter or forge the tobacco monopoly licenseC241


## 2.2. Expert Judgment Matrix Aggregation Based on Group Decision-Making

After establishing the index system hierarchy model in Table1, we need to construct pairwise judgment matrices at different levels. In the pairwise judgment matrix, when we describe the importance of the i-th and j-th factors relative to a factor at the upper level, it is represented by the quantitative relative weight aij, and the value of aij is set with reference to the value in Table 2. Suppose there are n factors involved in the comparison; then, the paired judgment matrix is
(1)A=aijn×nTable 2
Table of factor relative importance calibration values.
Importance scaleMeaning (for the influence of the previous factor, the former is compared with the latter)1Equally important3Slightly important5Obviously important7Strongly important9Extremely important2, 4, 6, 8Intermediate value of the above judgmentReciprocal1/naji=1/aijand satisfies the following properties:aij>0;aji=1/aij;aii=1. The first property states that the pairwise judgement matrix is nonnegative; the second and third properties state that the pairwise judgement matrix is symmetric. Further, when the pairwise judgement matrix satisfies the equation: aij×ajk=aik, it is transferable. When all elements of a pairwise judgement matrix satisfy symmetry and transferability, the pairwise judgement matrix is said to be consistent [13].For the paired judgment matrixA, we use MATLAB to find its eigenvalues, obtain its maximum eigenvalue λmax, and then calculate the general indicator CI:
(2)CI=λmax−nn−1,where n is the order of matrix A. The random consistency index CR of the pairwise judgment matrix A is further calculated:
(3)CR=CIRI,where RI is a weighted evaluation indicator, the values of which are shown in Table3.Table 3
Weighted evaluation indicators for different orders.
Order123456789Calibration value000.520.891.121.241.321.401.45IfCR<0.1, the consistency of the pairwise judgement matrix A meets the requirements. Otherwise, the values of the elements in A need to be readjusted.Based on the principle of group decision-making, we selected dozens of senior professors and experts and conducted a questionnaire survey to determine the data in the pairwise judgement matrix [14, 15]. Based on the hierarchy of indicators in Table 1, 11 pairwise judgement matrices were constructed. The key to aggregate judgement matrices based on group decision-making is to find a suitable method to fuse the judgement matrices given by several different experts without losing the details given by each expert. The fusion method based on the aggregation of individual judgements is used to fuse several different judgement matrices given by each expert into an overall matrix, so that the matrix retains the details of each expert’s matrix and wipes out the bias of individual judgements; at the same time, as the geometric mean method has the advantages of maintaining the positive and reciprocal inverse of the matrix before and after the aggregation, consistency, and keeping the consensus of group members unchanged, the geometric mean method is chosen and based on it. The geometric mean method was chosen, and expert weights were added on top of it to make the results more reasonable [16, 17]. The expert weight is obtained by factorising the export matrices and quasi-semi-vectorising them to find their similarities and differences and then finding the export weight. The steps include the following:
(1)
Calculate the similarity of each judgement matrix. Since each expert involved in the decision has individual dynamics and may come from different fields, their expertise and research directions also differ; therefore, each expert should have its own weight vector for different indicators. A total ofm matrices Aii=1,2,⋯,m,vecAp, and vecAq are the derived vectors of the matrices Ap and Aq, respectively, with their angles denoted as αpq, given by m experts:(4)γpq=cosαpq=vecAp.vecAqvecAp.vecAq,where the value ofγpq represents the similarity of the expert matrices Ap and Aq and ranges from 0 to 1, with a value closer to 0 representing a lower similarity between the two experts’ decisions and vice versa. Let
(5)γk=∑p=1,q≠kmγpq.Then,λk represents the similarity of the k-th expert to the overall evaluation obtained by combining the m experts. Normalising this gives
(6)λk=γk∑k=1mγk.The resulting resultλk is the normalised result of the overall evaluation similarity between the k-th expert and the combined m experts, measured in the same way as λpq.
(2)
Calculate the degree of variation of each judgement matrix. Letbkj be the element below the main diagonal in the judgement matrix given by the k-th expert; then, we have(7)σk=∑j=1nn−1/2bkj−∑i=1mbki,whereσk represents the difference between the evaluation of the k-th expert and the overall evaluation of the m experts. This is normalised to give
(8)φk=σk∑k=1mσk,whereφk denotes the normalised degree of variation; the smaller the value, the greater the weight to be given by the corresponding expert [18].
(3)
The fusion of expert judgment matrices is carried out according to the similarity and difference of each expert matrix, which is given by(9)ωk=λk,∑i=1mλiφi=1,γk1−φi1−∑i=1mλiφλ,∑i=1mλiφi≠1,whereωk is the combined weight of the k-th expert.Fuse the full expert judgment matrix into a consensus judgment matrixS.
(10)S=sijn×n,wheresij is the i-th row and j-th column element of the consensus matrix, satisfying
(11)sij=1,i=j,∏k=1maijkωk1/∑k=1mωk,i≠j,whereaijk is the element in row i and column j of the pairwise judgment matrix Ak.


## 2.3. Calculation of Indicator Weights Based on Hierarchical Analysis

After obtaining the consensus judgment matrixS, we calculate the intralevel weights and overall weights of each indicator through hierarchical analysis, and the specific steps include the following:
(1)
Intralevel weight calculation. For the consensus judgment matrixS, like the aforementioned paired judgment matrix A, we use the SVD algorithm to obtain the maximum eigenvalue λmax and then calculate the general indicators CI and CR. When CR<0.1, the S matrix is considered to meet the consistency requirement [19, 20]. When the maximum eigenvalue λmax is obtained, the normalised eigenvector, i.e., the weight vector, can be obtained at the same time:(12)W=w1,w2,⋯,wnT.The weight vectorW, calculated here, corresponds to the aforementioned pairwise judgement matrix A and the aggregated consensus judgement matrix S. It is the intratier weight of the layer in which the indicator is located. We can thus obtain the intralayer weights of the indicators in Table 1 for layers A, B, and C.
(2)
Overall weight calculation. The hierarchical structure of the corporate market integrity indicator system shown in Table1 is relatively simple as there is no crossover between the indicators in the layersClearly, the overall weightsw′ for each indicator in tier A, B, and C in Table 1 are
(13)w′Ai=wAi,w′Bij=wBij×wAi,w′Cijk=wCijk×wBij×wAi.


## 2.4. Integrated Unit Price Forecasting Model

### 2.4.1. Data Preprocessing

In corporate marketing projects, data relating to integrated unit prices are collected manually, with certain missing and outlier values. The premise of data modelling is to ensure the accuracy and completeness of the data, so data preprocessing is required. In this paper, a box-and-line diagram method is used to determine outliers and a linear filling method is used to deal with missing values. Figure2 shows the monthly average price of concrete C30 in a certain place from January 2016 to December 2019, and it is obvious that in May 2017, the price of concrete C30 was 520 RMB/m3, much higher than the rest of the monthly average price, which is an outlier [21, 22].Figure 2
Price of concrete C30.This anomaly determination is quantified using a box line diagram of(14)R=U−L,Ulim=U+1.5R,Llim=L−1.5R,whereU is the upper quartile of the data set, L is the lower quartile of the data set, Ulim is the upper bound, and Llim is the lower bound. The median and mean of the group are calculated and plotted on a box plot as shown in Figure 3, where “R” indicates the mean value; values above the upper bound or below the lower bound are considered outliers. The outliers can be treated as missing values, and the missing values are filled in a linear way. The concrete C30 price for May 2017 is filled with the average value of 353.8/m3 for April 2017 and June 2017 [23–25].Figure 3
Concrete C30 price box line diagram.


## 2.4.1. Data Preprocessing

In corporate marketing projects, data relating to integrated unit prices are collected manually, with certain missing and outlier values. The premise of data modelling is to ensure the accuracy and completeness of the data, so data preprocessing is required. In this paper, a box-and-line diagram method is used to determine outliers and a linear filling method is used to deal with missing values. Figure2 shows the monthly average price of concrete C30 in a certain place from January 2016 to December 2019, and it is obvious that in May 2017, the price of concrete C30 was 520 RMB/m3, much higher than the rest of the monthly average price, which is an outlier [21, 22].Figure 2
Price of concrete C30.This anomaly determination is quantified using a box line diagram of(14)R=U−L,Ulim=U+1.5R,Llim=L−1.5R,whereU is the upper quartile of the data set, L is the lower quartile of the data set, Ulim is the upper bound, and Llim is the lower bound. The median and mean of the group are calculated and plotted on a box plot as shown in Figure 3, where “R” indicates the mean value; values above the upper bound or below the lower bound are considered outliers. The outliers can be treated as missing values, and the missing values are filled in a linear way. The concrete C30 price for May 2017 is filled with the average value of 353.8/m3 for April 2017 and June 2017 [23–25].Figure 3
Concrete C30 price box line diagram.


## 2.5. Predictive Model Based on the Random Forest Algorithm

Random forest is a decision tree based on an evaluator pocket integration algorithm. The construction process of the random forest model is shown in Figure4. The input capacity is N, and the features are M [26–29]. The samples are randomly drawn N times, one sample at a time, as a decision tree with samples at the nodes; m features are randomly selected (m≤M), and since the prediction of the integrated unit price is a regression problem, the nodes are usually split by variance or least squares fitting method until the nodes can no longer split to form a decision tree; when the tree is smaller than the set value, repeat the above steps to continue to build the decision tree until it reaches the set value, forming a forest. When the tree is smaller than the set value, the above steps are repeated until the set value is reached, forming a forest.Figure 4
Random forest model construction process.When used for integrated unit price prediction, new sample data is input and each decision tree in the forest is predicted separately, and the predicted mean of all decision trees will be used as the output prediction of the random forest model. When the model performs poorly, it means that the model is not generalised enough and the generalisation error is large. The generalisation error is influenced by the complexity of the model structure, which is either too complex or too simple, so the optimal model complexity needs to be determined through model tuning [30, 31].For a single decision tree in a random forest, the deeper the node splits, the more complex the tree model. The default decision tree parameters allow the tree to grow indefinitely until the stopping conditions are met, so the tree is generally prone to overfitting. The important influencing parameters used in this paper are shown in Table4.Table 4
Important parameters of the random forest model.
ParameterExplainImpact on model performanceN_estimatorsNumber of base evaluators. The default is 100It does not affect the complexity of a single tree, but too small is easy to underfit, and too large is easy to overfitMax_depthMaximum tree depth, default maximum depthMaximum depth, i.e., maximum complexity, reduces max_depth to reduce model complexityMin_samples_leafThe minimum number of leaf nodes is 1 by defaultThe default value is the highest complexity, increasing min_samples_leaf to reduce model complexityMin_samples_splitThe minimum number of samples required for internal node division is 2 by defaultThe default value is the highest complexity, increasing min_samples_split to reduce model complexityMax_featureThe maximum number of features is auto by default, and the total number of features is squaredThe default value is the intermediate complexity, reducing max_feature to reduce the complexity of the model; on the contrary, it increases the complexity of the model


## 3. Analysis of Experimental Results

Two sets of experiments were carried out to compare the cast-in-place foundation list items of 100 enterprise market projects, one set did not consider the volatility of characteristic prices over time, and one set considered the volatility of market prices. According to the analysis of the influencing factors of the integrated unit price, the main influencing factors of the integrated unit price of labour, materials and construction equipment, and the use of construction machinery include labour, slab, and square materials, concrete C30, truck cranes, and trucks, etc.; the relevant data were collected and preprocessed.The first 70 samples were used as the training set to build the integrated unit price prediction model (using default parameters), and the last 30 samples were used as the test set to verify the prediction effect of the model. As shown in Figure5, in the training set, the mean absolute error (MAE) between the true and predicted values is equal to 9.83, and the mean absolute error rate (MAPE) is 1.51%, indicating that the model fits well in the training set; in the test set, the MAE is 24.59 and MAPE is 3.86%, indicating that the prediction model is overfitted and has a large generalization error. In addition to the influence of the model parameters, the factors affecting the integrated unit price were analysed to be influenced by market price fluctuations, so the time characteristics should be considered when building the model.Figure 5
Random forest model prediction results.The characteristic price information for the previous 12 months for all works was collected, and the Pearson correlation analysis was performed with the composite unit price, i.e.,(15)r=∑i=1nxi−x¯yi−y¯∑i=1nxi−x¯2∑i=1nyi−y¯2,wherer is the correlation coefficient between each feature and the composite unit price; n is the sample size of the project; and x and y are the mean values of the feature and the composite unit price in all samples, respectively. A positive correlation coefficient indicates a positive correlation, and a negative correlation coefficient indicates a negative correlation, with absolute values between 0 and 1. The results of the correlation analysis are shown in Figure 6. The correlation between each feature and the composite unit price gradually decreases with time, and the effect of the feature on the composite unit price can be ignored when the absolute value is below 0.05. Therefore, when building the random forest prediction model, the price information for the first 5 months of each sample was added to the data, making a total of 25 time features for prediction [32].Figure 6
Correlation coefficient between feature price and composite unit price for the first 12 months.The learning curve method is used to determine the optimal parameters, taking the n_estimators parameter as an example; considering the operation efficiency of the model, empirically, the n_estimators parameter is taken every 10 numbers starting from 1 until it reaches 201, keeping the rest of the parameters unchanged. The learning curve is shown in Figure7. When the n_estimators parameter is equal to 81, the highest score is 0.97, so the training set score is 0.975 by taking 1 number every 1 from 82 until it reaches 90. Following this method, the remaining parameters are tuned in turn, and the final results are max_depth=3, min_samples_leaf=2, min_samples_split=2, and max_feature=5. A comparison of the true, preoptimised, and postoptimised predicted values in the test set is shown in Figure 8. The MAE value after optimisation is 9.67, and the MAPE value is 1.55%, which is clearly better than the prediction model before optimisation.Figure 7
Learning curve (n_estimators parameter).Figure 8
Comparison of test set prediction results before and after optimization.


## 4. Conclusions

The core of enterprise market list pricing is the determination of the integrated unit price, which is mainly influenced by the cost of labor, materials and construction equipment, and the use of construction machinery. Considering the influence of market price fluctuations, the random forest algorithm, which has a good regression prediction effect in machine learning, is selected to model the time characteristics of the influencing factors. Compared with the preoptimisation results, the prediction of the integrated unit price decreases by 14.92% for MAE and 2.31% for MAPE, thus confirming the accuracy and feasibility of the proposed model. However, this paper only collects the data of the existing base list items in the enterprise market project for the integrated unit price prediction and will later collect the complete list item data of a project to build the integrated unit price prediction model and study how to further improve the prediction accuracy on the test set.



---

*Source: 2348084-2022-05-09.xml*