Logo
0+unknown

Getting Started

  • Overview
  • Installation
  • Credits
  • Support

Examples

  • Experiment emulators
  • Run a simple benchmark
  • Run a larger benchmark
  • Planners Interfaces
  • Noisy Inputs
  • Custom Dataset
  • Custom Planner

Core Classes

  • Planners
    • Bayesian Algorithms
    • Evolutionary Algorithms
    • Gradient Methods
    • Grid-Like Searches
      • Grid Search
      • Latin Hypercube Sampling
      • Sobol Sampling
      • Random Search
    • Others
    • Planner Function
  • Datasets
  • Models
  • Emulators
  • Surfaces
  • Noises

Advanced Usage

  • Custom Emulators
  • Custom Planners

Complete API Reference

  • olympus package
Olympus
  • »
  • Planners »
  • Grid Search
  • View page source

Grid Search¶

does this and that…

../../_images/grid.gif
class olympus.planners.Grid(*args, **kwargs)[source]

Grid search.

Note that the number of samples grow exponentially with the number of dimensions. E.g. for a 2-dimensional parameter space, with 2 levels, the grid will contain 4 samples; for a 3-dimensional space, it will contain 8 samples; for a 6-dimensional space, 64 samples.

Parameters
  • goal (str) – The optimization goal, either ‘minimize’ or ‘maximize’. Default is ‘minimize’.

  • levels (int, list) – How many locations in parameter space to sample per parameter/dimension. If an integer is provided, the same number of levels will be used for each dimension. Provide a list to use different levels for different dimensions. Default is 2.

  • budget (int) – Maximum number of samples you want to evaluate. From the specified budget an adequate value for the levels will be derived. Note that, if provided, the argument levels will be discarded. Default is None.

  • exceed_budget (bool) – Whether to allow building the grid with more samples then budget. This means some points might not be evaluated, but ensures there will be enough grid points to run as many evaluations as defined in budget. If False, the number of grid points will be less or equal to budget; this guarantees the budget is enough to guarantee the exploration of the whole grid. Default is True.

  • shuffle (bool) – Whether to randomize the order of the samples in the grid. Default is False.

  • random_seed (int) – Random seed. Set a random seed for a reproducible randomization of the grid if shuffle was set to True.

Methods

tell([observations])

Provide the planner with all previous observations.

ask([return_as])

suggest new set of parameters

recommend([observations, return_as])

Consecutively executes tell and ask: tell the planner about all previous observations, and ask about the next query point.

optimize(emulator[, num_iter, verbose])

Optimizes a surface for a fixed number of iterations.

reset()

Clears the remaining samples in the grid and prepares the planner for re-initialisation.

Next Previous

© Copyright 2020, Matteo Aldeghi, Riley Hickman and Florian Häse.

0+unknown
Other Versions