-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathensemble.py
48 lines (36 loc) · 2.81 KB
/
ensemble.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
# -*- coding: utf-8 -*-
"""
@author: Alex Yang
@contact: alex.yang0326@gmail.com
@file: ensemble.py
@time: 2020/6/8 22:01
@desc:
"""
from two_level_ensembler import voting_of_averaging
if __name__ == '__main__':
cv_model_list = [
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_pooler_tune_hid_5_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_pooler_tune_hid_4_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_pooler_tune_hid_3_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_pooler_tune_hid_2_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_pooler_tune_hid_1_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_5_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_4_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_3_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_2_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_1_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_hidden_tune_hid_1_harl_100_1.0_1.0_1.0_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_lstm_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_gru_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_gru_lstm_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_lstm_gru_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_cnn_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_lstm_cnn_tune_dense_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50',
'bert-base-uncased_name_desc_pair_len_200_bert_pooler_tune_1.0_1.0_1.0_mask_cate3_with_cate1_adam_2e-05_32_50'
]
voting_of_averaging(prefix_model_name_list=cv_model_list,
submit_file_prefix='cross_validation',
cv_random_state=42,
cv_fold=5,
use_ex_pair=False,
use_pseudo=False)