-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboxPlot2.py
More file actions
67 lines (58 loc) · 2.71 KB
/
boxPlot2.py
File metadata and controls
67 lines (58 loc) · 2.71 KB
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
66
67
import exec
print("\n\n*** DO NOT EXECUTE TWO SCRIPTS IN PARALLEL ***\n\n")
print(" 1) Adult \n 2) Compas \n 3) Crime \n 4) German \n 5) Health")
choice = int(input("Enter choice: "))
if(choice == 1):
data_folder = "adult"
reg_params = [1,0.05,0.01] #for linear rbf and poly respectively
gammas = [0.01,0.03,0.05,0.07,0.09]
degrees = [3]
coef0s = list(range(0,16,3))[1:]
abstractions = ['raf']
perturbations = ["noisecat"]
kernel_types = ['linear','rbf','poly']
exec.caller(data_folder,reg_params,gammas,degrees,coef0s,abstractions,perturbations,kernel_types,regType = 1,get_avg_bool = False, is_OH = 1, get_CE = 0, if_part = 0,if_print_raw=True, plot = 'boxplotDatasets')
if(choice == 2):
data_folder = "compas"
reg_params = [1,0.05,0.01]
gammas = [0.01,0.03,0.05,0.07,0.09]
degrees = [3]
coef0s = list(range(0,16,3))[1:]
abstractions = ['raf']
perturbations = ["noisecat"]
kernel_types = ['linear','rbf','poly']
exec.caller(data_folder,reg_params,gammas,degrees,coef0s,abstractions,perturbations,kernel_types,regType = 1,get_avg_bool = False, is_OH = 1, get_CE = 0, if_part = 0,if_print_raw=True, plot = 'boxplotDatasets')
if(choice == 3):
data_folder = "crime"
reg_params = [1,1,1]
gammas = [0.01,0.001,0.0001,0.00001]
degrees = [3,9,15,20]
coef0s = [0]
abstractions = ['raf']
perturbations = ["noisecat"]
kernel_types = ['linear','rbf','poly']
exec.caller(data_folder,reg_params,gammas,degrees,coef0s,abstractions,perturbations,kernel_types,regType = 1,get_avg_bool = False, is_OH = 1, get_CE = 0, if_part = 0,if_print_raw=True, plot = 'boxplotDatasets')
if(choice == 4):
data_folder = "german"
reg_params = [1,10,0.01]#[1,10,0.01]
gammas = [0.01,0.03,0.05,0.07,0.09]
degrees = [6]
coef0s = list(range(0,16,3))[1:]
abstractions = ['raf']
perturbations = ["noisecat"]
kernel_types = ['linear','rbf','poly']
exec.caller(data_folder,reg_params,gammas,degrees,coef0s,abstractions,perturbations,kernel_types,regType = 1,get_avg_bool = False, is_OH = 1, get_CE = 0, if_part = 0,if_print_raw=True, plot = 'boxplotDatasets')
if(choice == 5):
data_folder = "health"
reg_params = [0.01,0.1,0.1]
gammas = [0.01]
degrees = [3]
coef0s = [0.01]
abstractions = ['raf']
perturbations = ["noisecat"]
kernel_types = ['linear','rbf','poly']
exec.caller(data_folder,reg_params,gammas,degrees,coef0s,abstractions,perturbations,kernel_types,regType = 1,get_avg_bool = False, is_OH = 1, get_CE = 0, if_part = 0,if_print_raw=True, plot = 'boxplotDatasets')
print(f"\n\n\n OUTPUT LOCATION: \n" +
f"1) Check ./{data_folder}/{data_folder}-results.txt for detailed results\n" +
f"2) Check ./{data_folder}/{data_folder}-results_raw.txt for summary where\n" +
"the coloums are in the order Accuracy, Balanced Accuracy and Robutness\n")