Skip to content
Snippets Groups Projects
Commit e7ff7f86 authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Added noise std to directory name

parent afecc2a1
No related branches found
No related tags found
No related merge requests found
...@@ -598,7 +598,7 @@ def execClassif(arguments): ...@@ -598,7 +598,7 @@ def execClassif(arguments):
directory = execution.initLogFile(name, args.views, args.CL_type, directory = execution.initLogFile(name, args.views, args.CL_type,
args.log, args.debug, args.label, args.log, args.debug, args.label,
args.res_dir) args.res_dir, args.add_noise, args.noise_std)
randomState = execution.initRandomState(args.randomState, directory) randomState = execution.initRandomState(args.randomState, directory)
statsIterRandomStates = execution.initStatsIterRandomStates(statsIter, statsIterRandomStates = execution.initStatsIterRandomStates(statsIter,
randomState) randomState)
......
...@@ -777,7 +777,7 @@ def getDatabaseFunction(name, type): ...@@ -777,7 +777,7 @@ def getDatabaseFunction(name, type):
return getDatabase return getDatabase
def initLogFile(name, views, CL_type, log, debug, label, result_directory): def initLogFile(name, views, CL_type, log, debug, label, result_directory, add_noise, noise_std):
r"""Used to init the directory where the preds will be stored and the log file. r"""Used to init the directory where the preds will be stored and the log file.
First this function will check if the result directory already exists (only one per minute is allowed). First this function will check if the result directory already exists (only one per minute is allowed).
...@@ -800,11 +800,15 @@ def initLogFile(name, views, CL_type, log, debug, label, result_directory): ...@@ -800,11 +800,15 @@ def initLogFile(name, views, CL_type, log, debug, label, result_directory):
resultsDirectory : string resultsDirectory : string
Reference to the main results directory for the benchmark. Reference to the main results directory for the benchmark.
""" """
if add_noise:
noise_string = "_n_"+str(int(noise_std*100))
else:
noise_string = ""
if debug: if debug:
resultDirectory = result_directory + name + "/debug_started_" + time.strftime( resultDirectory = result_directory + name + noise_string +"/debug_started_" + time.strftime(
"%Y_%m_%d-%H_%M_%S") + "_" + label + "/" "%Y_%m_%d-%H_%M_%S") + "_" + label + "/"
else: else:
resultDirectory = result_directory + name + "/started_" + time.strftime( resultDirectory = result_directory + name + noise_string+ "/started_" + time.strftime(
"%Y_%m_%d-%H_%M") + "_" + label + "/" "%Y_%m_%d-%H_%M") + "_" + label + "/"
logFileName = time.strftime("%Y_%m_%d-%H_%M") + "-" + ''.join( logFileName = time.strftime("%Y_%m_%d-%H_%M") + "-" + ''.join(
CL_type) + "-" + "_".join( CL_type) + "-" + "_".join(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment