Skip to main content
. 2024 Jun 28;10:e2130. doi: 10.7717/peerj-cs.2130

Algorithm 1. Cyclic Analysis Method (CAM) algorithm.

Forward stepwise selection Algorithm
Input: CA Dataset, TA Target
Output: SV Selected Variables
1: SV ← φ // Set of selected variables
2: RV ← V // Set of remaining candidate variables
3:
4: // Forward Selection: Repeat until SV does not change
5: while SV changes, V
6:    // Identity the finest variable V best out of all residual variable RV, affording to PERF
7: Vbest argmax PERF (SV Inline graphic V)
       V € RV
8:  // Select V best if it increases performance according to condition C
9:  if PERF (SV Inline graphic Vbest) PERF (SV) then
10:   SV ← SV Inline graphic V best
11:   RV ← RV\V best
12: end if
13: end while
14:
15: // Backward selection: Repeat until SV does not change
16: while SV changes do
17:     // Identify the worst variable V worst out of all selected variables SV, affording to PERF
18:    Vworst argmax PERF (SV\V)
            V € SV
19:    // Remove V worst if it does not provide shrinkage performance according to criteria C
20:    if PERF (SV < V worst) PERF (SV) then
21:    SV ← SV\V worst
22:    endif
23: end while
24: return SV