|
Algorithm 4 Energy estimation penalty (EEPenalty) |
Input: is the ground truth of appliance m
is the predicted values of appliance m
is the clustered operational state data of appliance m
is a vector of all
is a vector of all
Output:
is the total Energy estimation Penalty for appliance m
-
1:
Init
-
2:
fortoTdo
-
3:
Obtain data point and
-
4:
if
and
then
-
5:
Compute closestCluster
-
6:
Compute closestCluster
-
7:
Obtain and
-
8:
Set and
-
9:
while (
and
) do
-
10:
Add data point to
-
11:
Add data point to
-
12:
Increment l
-
13:
end while
-
14:
Set
-
15:
Call ComputePenalty()
-
16:
Call AssignPenalty()
-
17:
end if
-
18:
end for
-
19:
return
-
20:
-
21:
Procedure ComputePenalty
-
22:
Compute
-
23:
Compute
-
24:
EndProcedure
-
25:
-
26:
Procedure AssignPenalty
-
27:
fortoldo
-
28:
if
then
-
29:
Assign penalty
-
30:
else
-
31:
Assign penalty
-
32:
end if
-
33:
end for
-
34:
EndProcedure
|