Skip to main content
. 2023 Feb 7;23(4):1874. doi: 10.3390/s23041874
Algorithm 2 Proposed FS Algorithm
Input: original EEG feature set [1 × d]
network initialize ▹ FPL to ones, rest randomly
n 1 ▹ pruning step counter
epochs 0 ▹ epochs between two pruning steps
epochs_final 0 ▹ all epochs during training
prec0,psovft0
while (d > des_feat_num) OR (epochs_final<max_epochs_final) do
    if (precfinal_prec) OR (epochsmax_epochs) OR (psovftmax_psovft) then ▹ Perform pruning on the FPL
        Ndeleted_weightsfloor(f·dn)
        d← delete the Ndeleted_weights weights in the FPL with the smallest magnitude
        epochs ← 0
        n = n + 1
    prec,epochs,epochs_final train()
newset_prec, newset_psovft← take the new k-sized feature subset and train the base network on it from scratch