Research Article
Benefit Analysis of Low-Carbon Policy Mix Innovation Based on Consumer Perspective in Smart City
Algorithm 2
BP-AdaBoost adaptive boosting algorithm.
Input: the training set {xs, ys, zs}, the test set {xd, yd, zd}. Initialize weight k. Calculate sample weight . | Output: predicting the carbon emissions of private cars {y} | (1) | k = 10. | (2) | For i = 1, 2, …, K do | (3) | Set the number of iterations e, set learning rate l, weak predictor training. | (4) | Calculate weak predictor predicting. | (5) | Calculate prediction error r, r = q − y. | (6) | Calculate test data predicting. | (7) | Adjust the weight. | (8) | For j = 1, 2, …, n do | (9) | If absolute value of error >0.2 then | (10) | New error = r + | (11) | New weight = 1.1 | (12) | Else | (13) | New weight = | (14) | End if | (15) | End for | (16) | Calculate the weak predictor weights. Normalize weight. | (17) | End for | (18) | Obtain the carbon emissions of private cars {y}. |
|