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: V←best
argmax PERF (SV
V)
|
V € RV
|
8: // Select V
best
if it increases performance according to condition C
|
9: if PERF (SV Vbest) PERF (SV) then
|
10: SV ← SV
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: V←worst
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
|