Skip to content
Snippets Groups Projects
Commit 80ffd548 authored by Pierre LOTTE's avatar Pierre LOTTE
Browse files

Add default parameters

parent 9ad4c63e
Branches
Tags 1.3.0
No related merge requests found
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
"window_size": [5, 100] "window_size": [5, 100]
}, },
"const": { "const": {
},
"default": {
"n_clusters": 50,
"window_size": 10
} }
}, },
"iforest": { "iforest": {
...@@ -15,7 +19,11 @@ ...@@ -15,7 +19,11 @@
}, },
"const": { "const": {
"max_features": 1.0 "max_features": 1.0
},
"default": {
"n_trees": 500
} }
}, },
"deepant": { "deepant": {
"training": true, "training": true,
...@@ -26,7 +34,12 @@ ...@@ -26,7 +34,12 @@
"const": { "const": {
"epochs": 500, "epochs": 500,
"learning_rate": 0.001 "learning_rate": 0.001
},
"default": {
"window_size": 50,
"prediction_window_size": 50
} }
}, },
"lstm_ad": { "lstm_ad": {
"training": true, "training": true,
...@@ -38,7 +51,13 @@ ...@@ -38,7 +51,13 @@
"const": { "const": {
"epochs": 500, "epochs": 500,
"learning_rate": 0.001 "learning_rate": 0.001
},
"default": {
"lstm_layers": 1,
"window_size": 200,
"prediction_window_size": 50
} }
}, },
"health_esn": { "health_esn": {
"training": true, "training": true,
...@@ -46,7 +65,11 @@ ...@@ -46,7 +65,11 @@
"prediction_window_size": [10, 100] "prediction_window_size": [10, 100]
}, },
"const": { "const": {
},
"default": {
"prediction_window_size": 50
} }
}, },
"random_black_forest": { "random_black_forest": {
"training": true, "training": true,
...@@ -59,7 +82,12 @@ ...@@ -59,7 +82,12 @@
"n_neighbors": [10, 100], "n_neighbors": [10, 100],
"n_trees": [50, 1000] "n_trees": [50, 1000]
}, },
"const": {} "const": {},
"default": {
"n_trees": 500,
"n_neighbors": 50
}
}, },
"lof": { "lof": {
"training": false, "training": false,
...@@ -67,7 +95,12 @@ ...@@ -67,7 +95,12 @@
"n_neighbors": [10, 100], "n_neighbors": [10, 100],
"leaf_size": [5, 50] "leaf_size": [5, 50]
}, },
"const": {} "const": {},
"default": {
"n_neighbors": 50,
"leaf_size": 20
}
} }
} }
#!/bin/sh #!/bin/sh
# Options SBATCH: # Options SBATCH:
#SBATCH --job-name=Synthetique #SBATCH --job-name=Synthetique_avec_optim
#SBATCH --cpus-per-task=8 #SBATCH --cpus-per-task=8
#SBATCH --array=1-20%9 #SBATCH --array=1-20%6
#SBATCH --nodelist=r9nc-24-9,r9nc-24-10,r9nc-24-11
#SBATCH --mail-type=END #SBATCH --mail-type=END
#SBATCH --mail-user=pierre.lotte@irit.fr #SBATCH --mail-user=pierre.lotte@irit.fr
......
#!/bin/sh #!/bin/sh
# Options SBATCH: # Options SBATCH:
#SBATCH --job-name=Synthetique #SBATCH --job-name=Synthetique_param_default
#SBATCH --cpus-per-task=8 #SBATCH --cpus-per-task=8
#SBATCH --array=1-20%6 #SBATCH --array=1-20%6
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
#SBATCH --partition=24CPUNodes #SBATCH --partition=24CPUNodes
# Traitement # Traitement
srun singularity exec /apps/containerCollections/CUDA12/pytorch2-NGC-24-02.sif /projects/sig/plotte/tsg_env/bin/python ./main.py -c config/generated_config_$SLURM_ARRAY_TASK_ID.json -a kmeans health_esn deepant lstm_ad iforest lof if_lof -o synth_generated -s all srun singularity exec /apps/containerCollections/CUDA12/pytorch2-NGC-24-02.sif /projects/sig/plotte/tsg_env/bin/python ./main.py -c config/generated_config_$SLURM_ARRAY_TASK_ID.json -a kmeans health_esn deepant lstm_ad iforest lof if_lof -o synth_generated_default -s all
...@@ -26,6 +26,7 @@ class BaseTrainer(): ...@@ -26,6 +26,7 @@ class BaseTrainer():
self.data_path = data_path self.data_path = data_path
self.params = kwargs["const"] self.params = kwargs["const"]
self.optim_params = kwargs["optimize"] self.optim_params = kwargs["optimize"]
self.default_params = kwargs["default"]
self.log_path = f"{'/'.join(data_path.split('/')[:-1])}/{self.__class__.__name__}_logs" self.log_path = f"{'/'.join(data_path.split('/')[:-1])}/{self.__class__.__name__}_logs"
self.algorithm = algorithm self.algorithm = algorithm
self.train = train self.train = train
...@@ -50,6 +51,8 @@ class BaseTrainer(): ...@@ -50,6 +51,8 @@ class BaseTrainer():
optimize_time = self.optimize("dataset", path) optimize_time = self.optimize("dataset", path)
with open(f"{path}/time.csv", "a", encoding="utf-8") as f: with open(f"{path}/time.csv", "a", encoding="utf-8") as f:
f.write(f"{self.algorithm},dataset,optimize,{optimize_time}\n") f.write(f"{self.algorithm},dataset,optimize,{optimize_time}\n")
else:
self.params.update(self.default_params)
files = __exec(f"find -L {self.data_path} -regex '^.*dataset[-_0-9]*\(_auto_split\)*.csv'") files = __exec(f"find -L {self.data_path} -regex '^.*dataset[-_0-9]*\(_auto_split\)*.csv'")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment