modifica per usare un file di config
This commit is contained in:
parent
1179f93485
commit
9964843459
74
fetus-event-detection-classification/experiments.json
Normal file
74
fetus-event-detection-classification/experiments.json
Normal file
@ -0,0 +1,74 @@
|
||||
[
|
||||
{
|
||||
"name": "all_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "all",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "fetus_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "fetus",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "mother_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "mother",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "fetus_mother_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "fetus-mother",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "mother_fetus_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "mother-fetus",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "all_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "all",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "fetus_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "fetus",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
},
|
||||
{
|
||||
"name": "mother_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "mother",
|
||||
"oversampling": false,
|
||||
"undersampling": false,
|
||||
"epochs": 50,
|
||||
"path": "~/Documents/womb-wise-data"
|
||||
}
|
||||
]
|
||||
83
fetus-event-detection-classification/src/experiments.py
Normal file
83
fetus-event-detection-classification/src/experiments.py
Normal file
@ -0,0 +1,83 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
def create_experiments(experiments_path, base_path):
|
||||
if os.path.exists(experiments_path):
|
||||
with open(experiments_path, "r") as f:
|
||||
return json.load(f)
|
||||
|
||||
experiments = [
|
||||
{
|
||||
"name": "all_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "all",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "fetus_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "fetus",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "mother_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "mother",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "fetus_mother_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "fetus-mother",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "mother_fetus_dataset_k1",
|
||||
"k_fold": 1,
|
||||
"dataset_type": "mother-fetus",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "all_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "all",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "fetus_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "fetus",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
{
|
||||
"name": "mother_dataset_k5",
|
||||
"k_fold": 5,
|
||||
"dataset_type": "mother",
|
||||
"oversampling": False,
|
||||
"undersampling": False,
|
||||
"epochs": 50,
|
||||
},
|
||||
]
|
||||
|
||||
for experiment in experiments:
|
||||
experiment["path"] = base_path
|
||||
|
||||
with open(experiments_path, "w") as f:
|
||||
json.dump(experiments, f, indent=4)
|
||||
|
||||
return experiments
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user