-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_selection_monk.py
More file actions
29 lines (23 loc) · 874 Bytes
/
Copy pathmodel_selection_monk.py
File metadata and controls
29 lines (23 loc) · 874 Bytes
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
import time
import numpy as np
from Hyperparameters import Hyperparameters
from validation.KFoldCV import KFoldCV
if __name__ == '__main__':
dataset_name = "monks-1"
#dataset_name = "monks-2"
#dataset_name = "monks-3"
#dataset_name = "monks-3-reg"
# set of hyperparametric values used for the Grid Search
possible_hyperparameters = Hyperparameters.get_default_hyperparameters(dataset_name)
stopping_criteria = {
"max_epoch": 150,
"threshold_variance": 0.
}
if dataset_name.startswith("monks-3"):
dataset_name = "monks-3"
start_tot = time.time()
KFoldCV(dataset_name=dataset_name, k=6,
possible_hyperparameters=possible_hyperparameters,
stopping_criteria=stopping_criteria).start()
time = "K-Fold Time: " + str(np.round(time.time() - start_tot, 6)) + "sec"
print(time)