|
Algorithm 1 Approach for load recognition based on the Analysis of Variance F-test with SelectKBest and the model optimization of the gradient-boosting machines |
-
Input:
Generated dataset (), proportion of training data (p.train), proportion of test data (p.test), initial number of components (), threshold (), number of folds (K), set of J candidates for the values of the maximum depth hyperparameter of the chosen model/GBM: = .
-
Output:
Type of load in operation
-
4:
Fourth step:
Obtain the eigenvalues via , in wich is the eigenvector matrix and is the diagonal matrix, i.e., .
-
6:
Sixth step:
Discover the optimal number of features (k) through CEV:
Generate the variable k and set its value to zero
Compute CEVr=
if CEVr≥
k ← number of r-th feature
end if
-
7:
Seventh step:
Employ the ANOVA with SelectKBest, according to k features, to obtain the new selected data for the training set, i.e., the .
-
9:
Ninth step:
Apply GS with K-CV
Divide in K folds
Train the model on each K fold
Calculate accuracy
Measure average accuracy
Assign the average accuracy to the current possible values for the hyperparameters
Adopt the hyperparameter with the highest average accuracy achieved:
|