src.estimation.gridsearch

Module Contents

Functions

run_1d_gridsearch(func, params, loc, gridspec, n_seeds, n_cores)

Run a grid search over one parameter.

run_2d_gridsearch(func, params, loc1, gridspec1, loc2, gridspec2, n_seeds, n_cores, mask=None, names=('x_1', 'x_2'))

Run a grid search over two parameters.

get_mask_around_diagonal(dim, offset=1, flip=True)

Get a mask that is true around diagonal or flipped diagonal.

_get_seeds(n_seeds)

_reshape_flat_list_2d(flat_list, shape)

run_1d_gridsearch(func, params, loc, gridspec, n_seeds, n_cores)[source]

Run a grid search over one parameter.

run_2d_gridsearch(func, params, loc1, gridspec1, loc2, gridspec2, n_seeds, n_cores, mask=None, names=('x_1', 'x_2'))[source]

Run a grid search over two parameters.

get_mask_around_diagonal(dim, offset=1, flip=True)[source]

Get a mask that is true around diagonal or flipped diagonal.

By flipped diagonal we mean the diagonal that goes from bottom left to top right.

Parameters
  • dim (int) – Dimension of the (square) mask.

  • offset (int) – How many rows around the diagonal are included on each side.

  • flip (bool) – Whether the standard or flipped diagonal is requested.

Returns

mask (np.ndarray)

_get_seeds(n_seeds)[source]
_reshape_flat_list_2d(flat_list, shape)[source]