saealib.KNNConstraintObjectiveSet#
- class saealib.KNNConstraintObjectiveSet(n_neighbors=50)[ソース]#
ベースクラス:
TrainingSetRetrieve the k nearest archive neighbours of
candidate_x.Analogue of
KNNObjectiveSetfor constraint surrogates. Returns the k-NN subset of(archive.x, archive.g)centred oncandidate_x.- パラメータ:
n_neighbors (int) -- Number of nearest neighbours to retrieve.
- 例外:
ValueError -- If
candidate_xis None, or if the archive has no constraint columns.
Methods
Return k nearest-neighbour archive points with raw constraint values. |
|
Return the training-set contract. |
Method Details
- KNNConstraintObjectiveSet.build(archive, population, ctx, candidate_x=None)[ソース]#
Return k nearest-neighbour archive points with raw constraint values.
- パラメータ:
archive (Archive)
population (Population | None)
ctx (OptimizationState | None)
candidate_x (np.ndarray | None)
- 戻り値の型:
- KNNConstraintObjectiveSet.contract()#
Return the training-set contract.
- 戻り値の型: