forked from RPI-OPT/APriD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_all.m
65 lines (52 loc) · 3.27 KB
/
run_all.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
clc
close all
clear
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% run the results in Subsection 5.1-5.4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% creat the file to save the running time shown in Table 2
file_time = fopen('running_time.txt','w');
fprintf(file_time, ['Example' ' & ' 'data or size' ' & ' 'APriD' ' & ' 'MSA' ' & ' 'CSA' ' & ' 'PDSG_adp' ' \\\\\n']);
fclose(file_time);
%% run the code for Neyman-Pearson Classification Problem
addpath ./Neyman_Pearson
addpath ./Neyman_Pearson/data_set
fprintf('-----------------------------------------------------------------\n')
fprintf('run the code for Neyman-Pearson Classification Problem\n')
fprintf('-----------------------------------------------------------------\n')
% run Neyman-Pearson Classification Problem with three different dataset
filename = 'spambase'; compare_algs_NP_class; clear; close all; fprintf('\n\n')
filename = 'madelon'; compare_algs_NP_class; clear; close all; fprintf('\n\n')
filename = 'gisette'; compare_algs_NP_class; clear; close all; fprintf('\n\n')
%% run the code for QCQP in Expectation Form
addpath ./QCQP_expect
fprintf('-----------------------------------------------------------------\n')
fprintf('run the code for QCQP in Expectation Form\n')
fprintf('-----------------------------------------------------------------\n')
n = 10; compare_algs_QCQP_expect; clear; close all; fprintf('\n\n')
n = 200; compare_algs_QCQP_expect; clear; close all; fprintf('\n\n') % need a long time for this one
%% run the code for finite-sum structured QCQP with many constraints
addpath ./QCQP_scenar
fprintf('-----------------------------------------------------------------\n')
fprintf('run the code for finite-sum structured QCQP with many constraints\n')
fprintf('-----------------------------------------------------------------\n')
n = 10; compare_algs_QCQP_scenario; clear; close all; fprintf('\n\n')
n = 200; compare_algs_QCQP_scenario; clear; close all; fprintf('\n\n')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% run the results in Subsection 5.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% run ApriD with different parameters for Neyman-Pearson Classification Problem
addpath ./Neyman_Pearson
addpath ./Neyman_Pearson/data_set
fprintf('-----------------------------------------------------------------\n')
fprintf('run ApriD with different parameters for Neyman-Pearson Classification Problem\n')
fprintf('-----------------------------------------------------------------\n')
filename = 'spambase'; select_parameters_NP_class; clear; close all; fprintf('\n\n')
filename = 'gisette'; select_parameters_NP_class; clear; close all; fprintf('\n\n')
%% run ApriD with different parameters for QCQP in Expectation Form
addpath ./QCQP_expect
fprintf('-----------------------------------------------------------------\n')
fprintf('run ApriD with different parameters for QCQP in Expectation Form\n')
fprintf('-----------------------------------------------------------------\n')
n = 10; select_parameters_QCQP_expect; clear; close all; fprintf('\n\n')
n = 200; select_parameters_QCQP_expect; clear; close all; fprintf('\n\n') % need a long time for this one