Why are different features selected every time when I use sequentialfs?

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?

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProblem-Based Optimization Setup についてさらに検索

質問済み:

2017 年 11 月 10 日

編集済み:

2017 年 11 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by