How to use the outputs of the Stepwise function?

1 view (last 30 days)
Hello, I am classifying P300 responses using matlab and all the papers recommed Stepwise Linear Discriminant Analysis. I have inputted training data using Stepwise(X,y) and gotten a result with a high R-square value, but when I hit export I don't know what variables I need and how I would apply them to new data to classify it.

Answers (1)

Richard Willey
Richard Willey on 22 Dec 2011
Hi John
The stepwise function in Statistics Toolbox is used for liner regression.
If you want to use a stepwise type algorithm with linear discriminant analysis your best option is to wrap the sequentialfs function around "classify" (Classify implement linear discriminant analysis).
sequentialfs will output a mask that you can use to indicate which variables should/should not be included in your final model.

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!