feature selection results vary every time.

1 次查看(过去 30 天)
Hi,
I used below code to do the feature selection. But every time I ran this code, the results were not the same.
I notice that the cvpartition function does do some random partition. so that why I got different results every time.
Are there any ways to improve this? So I could have more stable results.
Thanks,
Jacky
c = cvpartition(y,'k',5);
opts = statset('display','iter');
classf = @(train_data, train_labels, test_data, test_labels)...
sum(predict(fitcsvm(train_data, train_labels,'KernelFunction','rbf'), test_data) ~= test_labels);
[fs, history] = sequentialfs(classf, X_train, y_train, 'cv', c, 'options', opts);

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by