selector.pointselector
This module contains functions for selection of points.
Classes
Hyperparameterized selection of generated points. |
|
|
Generic point selector class. |
Random point selector class. |
- class selector.pointselector.HyperparameterizedSelector[source]
Bases:
PointSelectorHyperparameterized selection of generated points.
Note
Based on: Carlos Ansótegui, Meinolf Sellmann, Tapan Shah, Kevin Tierney, Learning to Optimize Black-Box Functions With Extreme Limits on the Number of Function Evaluations, 2021, International Conference on Learning and Intelligent Optimization, 7-24
- select_points(scenario, pool, number_of_points, epoch, max_epoch, features, weights, results, max_evals=100, seed=False)[source]
Select a subset of configurations from the pool based on a scoring function.
- Parameters:
scenario (selector.scenario.Scenario) – AC scenario.
pool (dict) – Pool of configurations to select from.
number_of_points (int) – Number of points to select from the pool.
epcoch (int) – Iteration identifier which stores the selection for later reference.
max_epoch (int) – Maximum number of iterations for the AC process (meaningless if termination criterion is total_runtime).
features (ndayrray) – Configuration features computed for each configuration in the pool.
weights (ndarray) – Pre-computed/ set weights for the scoring fuction.
results (dict) – Results for configuration /instance pairs.
max_evals (int) – Number of simulations per selected point.
seed (int) – Random seed.
- Returns:
IDs of configurations from the pool that are selected.
- Return type:
list
- class selector.pointselector.PointSelector(features=None)[source]
Bases:
objectGeneric point selector class.
- Parameters:
features (list of dict) – Problem instance features.
- class selector.pointselector.RandomSelector[source]
Bases:
PointSelectorRandom point selector class.
- select_points(pool, number_of_points, iteration, seed=False)[source]
Randomly select a subset of configurations from the pool to run.
- Parameters:
pool (dict) – Pool of configurations to select from.
number_of_points (int) – Number of points to select from the pool.
iteration (int) – Iteration identifier which stores the selection for later reference.
seed (int) – Random seed.
- Returns:
IDs of configurations from the pool that are selected.
- Return type:
list