Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 77879a1

Browse files
author
Tanguy Damart
committed
Updated doctrings
1 parent 9316237 commit 77879a1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bluepyopt/deapext/CMA_MO.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def __init__(self,
8585
sigma (float): initial standard deviation of the distribution
8686
max_ngen (int): total number of generation to run
8787
IndCreator (fcn): function returning an individual of the pop
88+
weight_hv (float): between 0 and 1. Weight given to the
89+
hypervolume contribution when computing the score of an
90+
individual in MO-CMA. The weight of the fitness contribution
91+
is computed as 1 - weight_hv.
8892
"""
8993

9094
if offspring_size is None:

bluepyopt/deapext/optimisationsCMA.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def __init__(self,
7272
selector_name (str): The selector used in the evolutionary
7373
algorithm, possible values are 'single_objective' or
7474
'multi_objective'
75+
weight_hv (float): between 0 and 1. Weight given to the
76+
hypervolume contribution when computing the score of an
77+
individual in MO-CMA. The weight of the fitness contribution
78+
is computed as 1 - weight_hv.
7579
fitness_reduce (fcn): function used to reduce the objective values
7680
to a single fitness score
7781
"""
@@ -90,6 +94,9 @@ def __init__(self,
9094
self.offspring_size = offspring_size
9195
self.centroids = centroids
9296
self.sigma = sigma
97+
98+
if weight_hv > 1. or weight_hv < 0.:
99+
raise Exception("weight_hv has to be between 0 and 1.")
93100
self.weight_hv = weight_hv
94101

95102
self.selector_name = selector_name

0 commit comments

Comments
 (0)