|
Algorithm 3 Event classification penalty (ECPenalty). |
Input: is the ground truth of appliance m
is the predicted values of appliance m
is the clustered operational state data of appliance m
Output:
is the total Event Classification Penalty for appliance m
-
1:
Set
-
2:
fortoTdo
-
3:
Get datapoint and
-
4:
if
and
then
-
5:
Compute closestCluster
-
6:
Set state of to
-
7:
Compute closestCluster
-
8:
Set state of to
-
9:
end if
-
10:
if state of
then
-
11:
Set penalty equal to 1
-
12:
else
-
13:
Set penalty equal to 0
-
14:
end if
-
15:
end for
-
16:
return
|