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 Exchange で Problem-Based Optimization Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!