[4d064f]: / python / run_train_SVM.py

Download this file

128 lines (90 with data), 5.4 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
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/env python
"""
run_SVM.py
VARPA, University of Coruna
Mondejar Guerra, Victor M.
27 Oct 2017
"""
from train_SVM import *
# Call different configurations for train_SVM.py
####################################################################################
winL = 90
winR = 90
do_preprocess = True
use_weight_class = True
maxRR = True
compute_morph = {''} # 'wvlt', 'HOS', 'myMorph'
multi_mode = 'ovo'
voting_strategy = 'ovo_voting' # 'ovo_voting_exp', 'ovo_voting_both'
use_RR = False
norm_RR = False
oversamp_method = ''
feature_selection = ''
do_cross_val = ''
C_value = 0.001
reduced_DS = False # To select only patients in common with MLII and V1
leads_flag = [1,0] # MLII, V1
pca_k = 0
################
# With feature selection
ov_methods = {''}#, 'SMOTE_regular'}
C_values = {0.001, 0.01, 0.1, 1, 10, 100}
gamma_values = {0.0}
gamma_value = 0.0
for C_value in C_values:
pca_k = 0
# Single
use_RR = False
norm_RR = False
compute_morph = {'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
"""
# Two
use_RR = True
norm_RR = True
compute_morph = {'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
use_RR = False
norm_RR = False
compute_morph = {'wvlt', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'HOS', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
# Three
use_RR = True
norm_RR = True
compute_morph = {'wvlt', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'HOS', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
use_RR = False
norm_RR = False
compute_morph = {'wvlt','HOS', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'wvlt','myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'HOS','myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
# four
use_RR = True
norm_RR = True
compute_morph = {'wvlt', 'HOS', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'wvlt', 'myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
compute_morph = {'HOS','myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
use_RR = False
norm_RR = False
compute_morph = {'wvlt', 'HOS','myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
# five
use_RR = True
norm_RR = True
compute_morph = {'wvlt', 'HOS','myMorph', 'u-lbp'}
main(multi_mode, 90, 90, do_preprocess, use_weight_class, maxRR, use_RR, norm_RR, compute_morph, oversamp_method, pca_k, feature_selection, do_cross_val, C_value, gamma_value, reduced_DS, leads_flag)
"""