saealib.DuplicateElimination#
- class saealib.DuplicateElimination(atol=1e-16, rtol=0.0, max_retries=100)[ソース]#
ベースクラス:
objectFilter offspring that duplicate any member of the current population.
- パラメータ:
atol (float) -- Absolute tolerance passed to
numpy.isclose. Matches theatolsemantics ofArchiveMixin.rtol (float) -- Relative tolerance passed to
numpy.isclose. Matches thertolsemantics ofArchiveMixin.max_retries (int) -- Maximum number of regeneration attempts per
ask()call.
Methods
Return the duplicate-filter contract. |
|
Return a boolean mask of offspring that duplicate the population. |
Method Details
- DuplicateElimination.__init__(atol=1e-16, rtol=0.0, max_retries=100)#
- パラメータ:
atol (float)
rtol (float)
max_retries (int)
- 戻り値の型:
None
- DuplicateElimination.find_duplicates(off_x, pop_x)[ソース]#
Return a boolean mask of offspring that duplicate the population.
- パラメータ:
off_x (numpy.ndarray of shape (N, dim)) -- Offspring decision vectors.
pop_x (numpy.ndarray of shape (M, dim)) -- Current population decision vectors.
- 戻り値:
Truewhereoff_x[i]is element-wise close to any row ofpop_x, using the sameatol/rtolas_find_idx().- 戻り値の型:
numpy.ndarray of shape (N,), dtype bool