⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 run.m

📁 Multiple INstance Learning Library
💻 M
字号:
function accu = run(data_file)

% %kNN
%  ref = [5 10];
%  for i = 1:length(ref)    
%      citer = ref(i) + 2;
%      cmd = ['classify -t ' data_file ' -sf 1 -n 1 -- cross_validate -t 10 -- kNN -RefNum ' num2str(ref(i)) ' -CiterRank ' num2str(citer)]; 
%      MIL_run(cmd);            
%  end

%mi-SVM polynomial
degree = [1];
cost = [1 10 100];

for i = 1 : length(degree)
    for j = 1 : length(cost)
        cmd = ['classify -t ' data_file ' -sf 1 -n 1 -distrib 1 -- cross_validate -t 10 -- inst_MI_SVM -Kernel 1 -KernelParam ' num2str(degree(i)) ' -CostFactor ' num2str(cost(j))]; 
        MIL_run(cmd);
    end
end

%mi-SVM RBF
gamma = [0.05];
cost = [1 10 100];

for i = 1 : length(gamma)
    for j = 1 : length(cost)
        cmd = ['classify -t ' data_file ' -sf 1 -n 1 -distrib 1 -- cross_validate -t 10 -- inst_MI_SVM -Kernel 2 -KernelParam ' num2str(gamma(i)) ' -CostFactor ' num2str(cost(j))]; 
        MIL_run(cmd);
    end
end

⌨️ 快捷键说明

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