Why are different features selected every time when I use sequentialfs?
Show older comments
I am using sequentialfs to get the best features that describe my model. Below is the piece of code where I define the criterion function and run the feature selection.
f = @(xtrain, ytrain, xtest, ytest) ((sum((predict(fitlm(xtrain,ytrain,'linear'),xtest) - ytest).^2))/22)^0.5;
fs_rmse = sequentialfs(f,combine_train_data,BBS,'keepin',keepin);
I get a different set of features for the same data every time. How do I know which answer is right? Also, is the above code correct for selecting features based on minimization of RMSE?
1 Comment
Quant
on 17 Nov 2017
Answers (0)
Categories
Find more on Problem-Based Optimization Setup 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!