How to use the outputs of the Stepwise function?

2 次查看(过去 30 天)
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.

回答(1 个)

Richard Willey
Richard Willey 2011-12-22
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.

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by