-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
121 lines (111 loc) · 2.75 KB
/
constants.py
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
NAN_STRING_TO_REPLACE = 'zz'
NAN_VALUE_FLOAT = 8888.0
NAN_VALUE_INT = 8888
NAN_VALUE_STRING = '8888'
BATCH_SIZE = 1000
EPOCHS = 5
N_NEURONS = 10
SEED = 8888
SPLITS = 20
SMOOTHING = 0.2
OTHER_NAN = 0
IMPUTING_STRATEGY = 'median'
PARAMS_CATBOOST = dict()
PARAMS_CATBOOST['logging_level'] = 'Silent'
PARAMS_CATBOOST['eval_metric'] = 'Logloss'
PARAMS_CATBOOST['custom_metric'] = 'Logloss'
PARAMS_CATBOOST['loss_function'] = 'Logloss'
PARAMS_CATBOOST['iterations'] = 125 # best 125
PARAMS_CATBOOST['od_type'] = 'Iter' # IncToDec, Iter
PARAMS_CATBOOST['random_seed'] = SEED
PARAMS_CATBOOST['learning_rate'] = 0.003 # alpha, default 0.03 if no l2_leaf_reg
PARAMS_CATBOOST['task_type'] = 'CPU'
PARAMS_CATBOOST['use_best_model']: True
PARAMS_CATBOOST['l2_leaf_reg'] = 3.0 # lambda, default 3, S: 300
PARAMS_CATBOOST_REGRESSOR = dict()
PARAMS_CATBOOST_REGRESSOR['logging_level'] = 'Silent'
PARAMS_CATBOOST_REGRESSOR['eval_metric'] = 'RMSE'
PARAMS_CATBOOST_REGRESSOR['custom_metric'] = 'RMSE'
PARAMS_CATBOOST_REGRESSOR['loss_function'] = 'RMSE'
PARAMS_CATBOOST_REGRESSOR['iterations'] = 5
PARAMS_CATBOOST_REGRESSOR['od_type'] = 'Iter' # IncToDec, Iter
PARAMS_CATBOOST_REGRESSOR['random_seed'] = SEED
PARAMS_CATBOOST_REGRESSOR['learning_rate'] = 0.003 # alpha, default 0.03 if no l2_leaf_reg
PARAMS_CATBOOST_REGRESSOR['task_type'] = 'CPU'
PARAMS_CATBOOST_REGRESSOR['use_best_model']: True
PARAMS_CATBOOST_REGRESSOR['l2_leaf_reg'] = 3.0 # lambda, default 3, S: 300
PARAMS_XGB = dict()
PARAMS_XGB['objective']='binary:logistic'
PARAMS_XGB['eval_metric'] = 'mae'
PARAMS_XGB['booster'] = 'gbtree'
PARAMS_XGB['eta'] = 0.02
PARAMS_XGB['subsample'] = 0.35
PARAMS_XGB['colsample_bytree'] = 0.7
PARAMS_XGB['num_parallel_tree'] = 10
PARAMS_XGB['min_child_weight'] = 40
PARAMS_XGB['gamma'] = 10
PARAMS_XGB['max_depth'] = 3
W_FEATURES = [
'WTeamID',
'WFGM',
'WFGA',
'WFGM3',
'WFGA3',
'WFTM',
'WFTA',
'WOR',
'WDR',
'WAst',
'WTO',
'WStl',
'WBlk',
'WPF',
'WScore',
'Final_WTeam',
#'Semi_Final_WTeam',
'WTeam_W_count',
'WScore_mean',
'WScore_median',
'WScore_sum',
'WTeam_Seed',
'WTeam_PerCent',
'Diff_WTeam',
'WFGA_min',
#'WFGA_max',
'WFGA_mean',
'WFGA_median'
#'WAst_mean',
#'WBlk_mean'
]
L_FEATURES = [
'LTeamID',
'LFGM',
'LFGA',
'LFGM3',
'LFGA3',
'LFTM',
'LFTA',
'LOR',
'LDR',
'LAst',
'LTO',
'LStl',
'LBlk',
'LPF',
'LScore',
'Final_LTeam',
#'Semi_Final_LTeam',
'LTeam_L_count',
'LScore_mean',
'LScore_median',
'LScore_sum',
'LTeam_Seed',
'LTeam_PerCent',
'Diff_LTeam',
'LFGA_min',
#'LFGA_max',
'LFGA_mean',
'LFGA_median'
#'LAst_mean',
#'LBlk_mean'
]