models.random_search()

Draws n candidates with draw(rng) from random.Random(seed)

Usage

Source

models.random_search(
    n, seed, draw, make, design, y, splits, score, n_jobs=None
)

and scores them as grid_search does: with several hyperparameters, random candidates cover each range better than a grid of the same size.

Parameters

n: int
seed: int
draw: callable

draw(rng) -> candidate, for example lambda rng: log_uniform(rng, 1e-4, 1.0).

make

As grid_search.

design

As grid_search.

y

As grid_search.

splits

As grid_search.

score

As grid_search.

n_jobs
As grid_search.

Returns

SearchResult