This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Launch_Exps.py
43 lines (36 loc) · 1.8 KB
/
Launch_Exps.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
# Neural Transformation Learning for Anomaly Detection (NeuTraLAD) - a self-supervised method for anomaly detection
# Copyright (c) 2022 Robert Bosch GmbH
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
import argparse
from config.base import Grid, Config
from evaluation.Experiments import runExperiment
from evaluation.Kvariants_Eval import KVariantEval
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--config-file', dest='config_file', default='config_thyroid.yml')
parser.add_argument('--dataset-name', dest='dataset_name', default='thyroid')
return parser.parse_args()
def EndtoEnd_Experiments(config_file, dataset_name):
model_configurations = Grid(config_file, dataset_name)
model_configuration = Config(**model_configurations[0])
dataset =model_configuration.dataset
result_folder = model_configuration.result_folder+model_configuration.exp_name
exp_class = runExperiment
risk_assesser = KVariantEval(dataset, result_folder, model_configurations)
risk_assesser.risk_assessment(exp_class)
if __name__ == "__main__":
args = get_args()
config_file = 'config_files/'+args.config_file
EndtoEnd_Experiments(config_file, args.dataset_name)