Skip to main content
. 2024 Aug 2;24(15):5003. doi: 10.3390/s24155003
Algorithm 1: [26] SABO–VMD–WMH–KNN
Input: Original signal X. K, α, search agents N, number of iterations T, Number of neighbors K, weighting coefficients W.
Output: classified labels Y
1: Function VMD(X, K, α)
2: U, K//Initialize matrix U with K rows and length(x) columns
3: for i = 1:K
4: U(i, :)//Initialize mode U(i, :) with random values
5: return U//Update mode U(i, :)
6: Function SABO(U, N, T)
7: for i = 1:T
8:   for i = 1:N
9: F(i), X(i, :)//Calculate objective function F(i) for search agent X(i, :)
10:   for i = 1:N
11: Compute mean displacement based on other agents
12: return U
13: Function WMH_KNN(U, TrainingData, K, Weights)
14: for i = 1:TestData
15: W*MH//Compute WMH distance to all training samples
16: K//Voting categories
17: return Y