Does stepwise variable selection for classification happen inside or outside the cross validation loop?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

amitetkin
Posts: 1
Joined: Sun Oct 15, 2017 9:10 pm

Does stepwise variable selection for classification happen inside or outside the cross validation loop?

Postby amitetkin » Sun Oct 15, 2017 9:26 pm

Hi-

I am doing classification using the discriminant function, and employing stepwise variable selection. I am interested in determining leave-one-out cross-validation accuracy for this classification, and thus selected that output metric. I have gotten results, however, that suggest that while LOO cross-validation by itself may be determining variable weights for the training set and applying it to the hold-out data, the stepwise variable selection may not be. That is, what I would like to know is whether the stepwise part is happening on all the data and then LOO cross-validation uses those features, or wether the stepwise and weight determination are all happening within the LOO training set and then are applied to the test data. If the former is the case, then it would mean that stepwise variable selection cannot be validly used with LOO cross-validation in SPSS, right?

Does anybody know the answer to this?

many thanks,
Amit

Who is online

Users browsing this forum: No registered users and 2 guests

cron