Skip to main content
. 2026 May 27;18(11):1320. doi: 10.3390/polym18111320
Algorithm 1: Feature Selection using RFE
Input: Feature matrix x, target vector y, desired number of features k
Output: Selected feature subset X_selected
1. Initialize feature set F= all features in X
2. While the number of features in F>k:
      a. Train model M on X[:,F] to predict y
      b. Compute feature importance scores Tj for each feature in F
      c. Identify feature F_min with the lowest importance
      d. Remove F_min from F
3. Return X_selected = X[:,F]