Skip to main content
. Author manuscript; available in PMC: 2017 Jul 27.
Published in final edited form as: Hum Brain Mapp. 2015 Oct 24;36(12):4869–4879. doi: 10.1002/hbm.22956

Algorithm 1.

SVM-RFE embedded N-fold cross-validation

Randomly partition subjects into equal-sized N folds, each fold contains the same number of smokers and nonsmokers
For S = 1…N-fold
 Exclude subjects in S-fold for testing
 Initialize FeatureSet to all features
 While FeatureSet is not empty
  Train SVM using FeatureSet
  Test SVM on S-fold
  Compute weight vector of SVM
  Rank features according to wi2
  Remove one feature with the lowest ranking
 End While
End For
Compute accuracy over all subjects for each FeatureSet size
Find the minimum FeatureSet size on which SVM get the highest accuracy