Skip to content

Commit

Permalink
Fix min mutation proba
Browse files Browse the repository at this point in the history
  • Loading branch information
YamLyubov committed Nov 27, 2023
1 parent 93deb2b commit 620279d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion golem/core/optimisers/genetic/parameters/mutation_prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AdaptiveMutationProb(AdaptiveParameter[float]):
def __init__(self, default_prob: float = 0.5):
self._current_std = 0.
self._max_std = 0.
self._min_proba = 0.05
self._min_proba = 0.1
self._default_prob = default_prob

@property
Expand Down
3 changes: 2 additions & 1 deletion test/integration/test_genetic_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def test_genetic_scheme_types(genetic_type):
num_iterations=num_iterations)
assert found_graph is not None
# at least 20% more generation than early_stopping_iterations were evaluated
assert history.generations_count >= num_iterations // 3 * 1.2
# (+2 gen for initial assumption and final choice)
assert history.generations_count >= num_iterations // 3 * 1.2 + 2
# metric improved
assert np.mean([ind.fitness.value for ind in history.generations[0].data]) > \
np.mean([ind.fitness.value for ind in history.generations[-1].data])

0 comments on commit 620279d

Please sign in to comment.