-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Why are optimization results from cartesian products not reproducible by default? #302
Unanswered
binarymason
asked this question in
Q&A
-
If optimization is doing an exhaustive search through all of the combinations of the cartesian product of parameters, why do I need to set random_state
to get reproducible results? I would think an exhaustive search would give me reproducible results no matter what.
Thanks!
backtesting.py/backtesting/backtesting.py
Line 1254 in e3cccdf
backtest.optimize(sma1=[5, 10, 15], sma2=[10, 20, 40],
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
random_state=
comes in use when max_tries=
is set.
backtesting.py/backtesting/backtesting.py
Lines 1216 to 1222 in e3cccdf
`max_tries` is the maximal number of strategy runs to perform.
If `method="grid"`, this results in randomized grid search.
If `max_tries` is a floating value between (0, 1], this sets the
number of runs to approximately that fraction of full grid space.
Alternatively, if integer, it denotes the absolute maximum number
of evaluations. If unspecified (default), grid search is exhaustive,
whereas for `method="skopt"`, `max_tries` is set to 200.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment