saealib.KNNObjectiveSet#

class saealib.KNNObjectiveSet(n_neighbors=50)[ソース]#

ベースクラス: TrainingSet

Retrieve the k nearest archive neighbours of candidate_x.

This is the default training set for LocalSurrogateManager.

パラメータ:

n_neighbors (int) -- Number of nearest neighbours to retrieve.

Methods

__init__

build

Return k nearest-neighbour archive points around candidate_x.

contract

Return the training-set contract.

Method Details

KNNObjectiveSet.__init__(n_neighbors=50)[ソース]#
パラメータ:

n_neighbors (int)

戻り値の型:

None

KNNObjectiveSet.build(archive, population, ctx, candidate_x=None)[ソース]#

Return k nearest-neighbour archive points around candidate_x.

パラメータ:
  • archive (Archive)

  • population (Population | None)

  • ctx (OptimizationState | None)

  • candidate_x (np.ndarray | None)

戻り値の型:

TrainingData

KNNObjectiveSet.contract()#

Return the training-set contract.

戻り値の型:

ComponentContract