run_sup.m

来自「Multiple INstance Learning Library」· M 代码 · 共 20 行

M
20
字号
function accu = run_sup(data_file)

% degree = [1 2 3];
% cost = [1 10 100];
% 
% for i = 1 : length(degree)
%     for j = 1 : length(cost)
%         cmd = ['classify -t ' data_file ' -if 1 -sf 1 -n 0 -- cross_validate -t 10 -- LibSVM -Kernel 1 -KernelParam ' num2str(degree(i)) ' -CostFactor ' num2str(cost(j))]; 
%         test_classify(cmd);
%     end
% end

gamma = [0.01 0.05];
cost = [1 10 100];
for i = 1 : length(gamma)
    for j = 1 : length(cost)
        cmd = ['classify -t ' data_file ' -if 1 -sf 1 -n 0 -- cross_validate -t 10 -- LibSVM -Kernel 2 -KernelParam ' num2str(gamma(i)) ' -CostFactor ' num2str(cost(j))]; 
        test_classify(cmd);
    end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?