Table 2 Proposed algorithm of predicting energy efficiency in green building using AL.

From: Active learning-based machine learning approach for enhancing environmental sustainability in green building energy consumption

Algorithm 1 Proposed Algorithm of Predicting Energy Efficiency in Green Building using AL

1: Input Energy Efficiency Dataset labels

2: Cit = 3 {Count of Iterations}

3: Qstrategy = USample {Query Strategy = Uncertain sample}

4: Output Energy Efficiency Prediction in Green Building

5: EMeasure : Prediction Accuracy (R2), MSE, MAE,RAE

6: Initialization ’a’

7: List of Regressor: RFR, GBR, XGBoostR, LR, KNR, CatBoostR, LightBGMR and DTR

8: ’Alg_names’ indicates the name, and ’algorithms’ describe the list

9: Assign the training and testing groups the appropriate variables, ’X_train’, ’X_test’, ’y_train’, and ’y_test’

10: Divide the dataset into sets for testing and training

11: for Algo in Algos do

12: Assign the following initialization variables to the Active Learner:

13: Pass the model, X_train, and y_train points to the respective arguments to create an Active Learner object

14: Generate a custom_query_strategy technique called Y_pool that accepts the set of unlabeled cases as input

15: The function reinstate the uncertainty_sampling with the arguments learner, Y_pool

16: Set ’m_round’ to 3 and provide the value "active learning iterations."

17: for Round in span(m_round) do

18: Imprint "round. (iteration + 1)"

19: Call "custom_query_strategy" with "Y_test" as the varaible and assign the results to "query_idx"

20: Select "X_test" and "y_test" for indices in "query_idx"

21: X_pool and y_pool ought to be assigned the fnal values in accordance with

22: Consider the predictions for the most uncertain situations in the "X_pool" as an input

23: Assign a value to the variable "y_pred_pool"

24: With the inputs "X_pool" and "y_pred_pool," To the "learner" object, add the unclear cases along with their expected labels

25: end for

26: Display the regressor assessment metrics, containing the average accuracy (R2), MSE, MAE, and RAE

27: Provide the final classification results for each classifier

28: end for