From fdc7461aba3349070efc5feabb8c6dfeedaf1541 Mon Sep 17 00:00:00 2001 From: Ryoki Hamano Date: Tue, 13 Aug 2024 11:33:45 +0900 Subject: [PATCH] Update _catcma.py --- cmaes/_catcma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmaes/_catcma.py b/cmaes/_catcma.py index 1e0ee0a..b539474 100644 --- a/cmaes/_catcma.py +++ b/cmaes/_catcma.py @@ -117,7 +117,7 @@ def __init__( # (CMA uses negative weights while CatCMA uses positive weights.) weights_prime = np.array( [ - math.log((population_size + 1) / 2) - math.log(i + 1) if i <= mu else 0 + math.log((population_size + 1) / 2) - math.log(i + 1) if i < mu else 0 for i in range(population_size) ] )