File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
freqtrade/optimize/hyperopt Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 4545
4646logger = logging .getLogger (__name__ )
4747
48+ INITIAL_POINTS = 30
4849
4950MAX_LOSS = 100000 # just a big enough number to be bad result in loss optimization
5051
@@ -425,7 +426,16 @@ def get_optimizer(
425426 raise OperationalException (f"Optuna Sampler { o_sampler } not supported." )
426427 with warnings .catch_warnings ():
427428 warnings .filterwarnings (action = "ignore" , category = ExperimentalWarning )
428- sampler = optuna_samplers_dict [o_sampler ](seed = random_state )
429+ if o_sampler in ["NSGAIIISampler" , "NSGAIISampler" ]:
430+ sampler = optuna_samplers_dict [o_sampler ](
431+ seed = random_state , population_size = INITIAL_POINTS
432+ )
433+ elif o_sampler in ["GPSampler" , "TPESampler" , "CmaEsSampler" ]:
434+ sampler = optuna_samplers_dict [o_sampler ](
435+ seed = random_state , n_startup_trials = INITIAL_POINTS
436+ )
437+ else :
438+ sampler = optuna_samplers_dict [o_sampler ](seed = random_state )
429439 else :
430440 sampler = o_sampler
431441
You can’t perform that action at this time.
0 commit comments