cross-validation in sequentialfs

1 view (last 30 days)
Dan87
Dan87 on 8 Nov 2011
Hi. I'm trying to set up a model that correlates a (n x m) matrix of predictor variables and a (n x 1) matrix of response variables. From what I can gather, I need to be using sequentialfs to select the relevant predictor variables, and my evaluation function is currently based on glmfit:
dev=fun(X,Y)
[b,dev]=glmfit(X,Y,'normal')
The model generated this way is very good for the training set and very bad for the validation set, suggesting that I need to use some kind of iterative cross-validation process to make the model more generally applicable. However, all the examples of CV implemented in sequentialfs seem to focus on classification of the Fisher iris data, in which the response variable can be one of three well-defined categories rather than floating point reals.
Is there an easy or obvious way to do what I want? I'm new to using matlab so there's a good chance I've missed something basic, but there's an equally good chance that I'm assuming something is basic when it's really not...
Any help will be appreciated!

Answers (0)

Community Treasure Hunt

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

Start Hunting!