[need help] how to improve non-linear result of svmtrain with grid search

4 ビュー (過去 30 日間)
Abdul Hamzah
Abdul Hamzah 2017 年 7 月 4 日
回答済み: Abdul Hamzah 2017 年 7 月 4 日
hello everyone, i have a problem with the result of svmtrain function on matlab and i would like to improve the result with grid search. My code is as follows :
clc;
clear;
close all;
%load data
data = load('database.mat','data');
data_train = (data.data(1:355,:));
data_test = (data.data(356:442,:));
%load class
class = 'E:\target.xlsx';
%taking the matrix
train_class = xlsread(class,'A1:A355');
test_class = xlsread(class,'A356:A442');
%crossvalidation SVM
cvFolds = crossvalind('kFold',train_class,70);
cp = classperf(train_class);
for i = 1:70
testIdx = (cvFolds == i);
trainIdx = ~testIdx;
model= svmtrain(data_train(trainIdx,:),train_class(trainIdx),...
'kernelcachelimit',100000,'kernel_function','polynomial','polyorder',4);
end
class_predict = svmclassify(model,data_test);
c = confusionmat(test_class, class_predict);
acc = sum(diag(c))/sum(c(:)); %accuracy
the accuracy is still below 90 percent so i want to improve it more by using grid search, to get the most optimum accuracy..do you know how to do that? or is there a better method than grid search? thx before..

回答 (1 件)

Abdul Hamzah
Abdul Hamzah 2017 年 7 月 4 日
hello..anyone?

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by