Skip to main content
. 2023 Aug 25;23(17):7434. doi: 10.3390/s23177434
Algorithm 2: M-LVW feature selection algorithm
Input: Performance evaluation metric e (evaluation criterion for feature subsets) of the classifier; dataset D; feature set F; classification algorithm h; and stop condition control parameter T
Output: feature subset F*
Process:
1. Initialize: score=CrossValidationhF,D,e; d=F; F*=F; t=0
2. If the value of evaluation metric e for the classifier is positively correlated with the performance of the classifier, then
3.    p=True
4. else
5.    p=False
6. end if
7. while t<T do
8.    Randomly generate feature subset F
9.    d=F
10.   score=CrossValidationhF,D,e
11.   if p==True AND score>score  OR  p==False AND score<score  OR  (score==score AND d<d)then
12.       F*=F; t=0; score=score; d=d
13.   else
14.      t=t+1
15.   end if
16. end while
return feature subset F*