Finding probability distributions associated with a cross-validated svm using bayesopt
1 回表示 (過去 30 日間)
古いコメントを表示
I am finding difficulty in computing the probability of the predictions after training a Support Vector Machine with kfold cross validation and optimizing the hyperparameters using Bayesian optimization.
This is the code I am using
data = [S' U']'; size1 = size(S,1); size2 = size(U,1); theclass = ones((size1+size2),1); theclass(size1+1:end) = -1;
%% Preparing Cross Validation
c = cvpartition((size1+size2),'KFold',100);
%% Optimizing the SVM Classifier
opts = struct('Optimizer','bayesopt','ShowPlots',true,'CVPartition',c,... 'AcquisitionFunctionName','expected-improvement-plus');
svm = fitcsvm(data,theclass,'KernelFunction','rbf',... 'OptimizeHyperparameters','auto','HyperparameterOptimizationOptions',opts)
Any help is appreciated
0 件のコメント
回答 (1 件)
Don Mathis
2018 年 4 月 5 日
編集済み: Don Mathis
2018 年 4 月 5 日
To get posterior probabilities on a test set using a trained SVM, you can consult this Documentation page:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Classification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!