Class: ParameterGrid

Grid of parameters with a discrete number of values for each.

Can be used to iterate over parameter value combinations with the Python built-in function iter. The order of the generated parameter combinations is deterministic.

Read more in the User Guide.

Python Reference

Constructors

new ParameterGrid()

new ParameterGrid(opts?): ParameterGrid

Parameters

ParameterTypeDescription
opts?object-
opts.param_grid?anyThe parameter grid to explore, as a dictionary mapping estimator parameters to sequences of allowed values. An empty dict signifies default parameters. A sequence of dicts signifies a sequence of grids to search, and is useful to avoid exploring parameter combinations that make no sense or have no effect. See the examples below.

Returns ParameterGrid

Defined in generated/model_selection/ParameterGrid.ts:25

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/model_selection/ParameterGrid.ts:23
_isInitializedbooleanfalsegenerated/model_selection/ParameterGrid.ts:22
_pyPythonBridgeundefinedgenerated/model_selection/ParameterGrid.ts:21
idstringundefinedgenerated/model_selection/ParameterGrid.ts:18
optsanyundefinedgenerated/model_selection/ParameterGrid.ts:19

Accessors

py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/model_selection/ParameterGrid.ts:39

Methods

dispose()

dispose(): Promise<void>

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Returns Promise<void>

Defined in generated/model_selection/ParameterGrid.ts:91


init()

init(py): Promise<void>

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Parameters

ParameterType
pyPythonBridge

Returns Promise<void>

Defined in generated/model_selection/ParameterGrid.ts:52