Research Article
Predicting Short-Term Electricity Demand by Combining the Advantages of ARMA and XGBoost in Fog Computing Environment
Algorithm 1
Prototype-based K-means clustering algorithm.
Input: Historical electricity consumption records R | Output: the group division of enterprise users ClusterSet(Poweri) | (1) / the historical total electricity consumption of each / | INPUT: | FOR To length(useri) | DO | SumPoweri = 0 | FOR To length(Record_datej) | DO | SumPoweri = SumPoweri + ; | END | END | OUTPUT: | (2) / the clustering algorithm (K-means) to cluster all the objects and then choose k = | 1 to cluster all the samples into a cluster and find the centroid of the / | INPUT: | DO | Select | ClusterCenter = Kmeans (SumPoweri) | END | OUTPUT: ClusterCenter | (3) / the relative / | INPUT: ClusterCenter, | FOR To length(useri) | DO | | MedianDistancei = median(AbsoluteDistancei) | RelativeDistancei = AbsoluteDistancei/MedianDistancei | END | OUTPUT: | (4) Make discrete point relative distance error figure and roughly determine the range of k | accord to the relative distance | (5) /-means algorithm to do clustering for enterprises, and get the groups of enterprises | according to the result of / | INPUT: , k | DO | Select | ClusterSet(useri) = Kmeans(useri) | END | OUTPUT: ClusterSet(useri) |
|