Skip to main content
. 2022 Dec 5;22(23):9503. doi: 10.3390/s22239503
Algorithm 1: Savings Quantification
Input: X: Training Data
features: Selected set of features
Y: Training Energy Consumption
E: ECM Projects
R: Reporting Period Data
Output: Z: Savings dictionary
1: model ← XGBoost()
2: H ← initialize hyperparameters dictionary
3: Z = {}
4: for each ECM Ei ∈ E do
5: X[Ei [‘name’]] ← Add new feature per ECM project and set default value to 0
R[Ei[‘name’]] ← Add new feature per ECM project
6: for all data points Xj ∈ X do
7:   If Xj[‘date’] > Ei[‘date_start’] then
8:     Xj[Ei [‘name]] = 1
  end if
9: end for
10: features.add (Ei[‘name’])
11: end for
12: optimized_model = GridSearchCV (model, params = H, scoring = ‘rmse’)
13: optimized_model.fit(X[features], Y)
14: for  each ECM Ei ∈ E do
15: R[Ei[‘name’]] ← Set feature value to 0 for all data points
16: consumption_no_ecm = optimized_model.predict(R[features])
17: R[Ei[‘name’]] ← Set feature value to 1 for all data points
18: consumption_with_ecm = optimized_model.predict(R[features])
19: savings = SUM (consumption_no_ecm-consumption_with_ecm)
20: Z[Ei[‘name’]] = savings
21: end for
22: return Z