Documentation
Classes
ParameterGrid

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 (opens in a new tab)

Constructors

constructor()

Signature

new ParameterGrid(opts?: object): ParameterGrid;

Parameters

NameTypeDescription
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 (opens in a new tab)

Methods

dispose()

Disposes of the underlying Python resources.

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

Signature

dispose(): Promise<void>;

Returns

Promise<void>

Defined in: generated/model_selection/ParameterGrid.ts:92 (opens in a new tab)

init()

Initializes the underlying Python resources.

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

Signature

init(py: PythonBridge): Promise<void>;

Parameters

NameType
pyPythonBridge

Returns

Promise<void>

Defined in: generated/model_selection/ParameterGrid.ts:52 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/model_selection/ParameterGrid.ts:23 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/model_selection/ParameterGrid.ts:22 (opens in a new tab)

_py

PythonBridge

Defined in: generated/model_selection/ParameterGrid.ts:21 (opens in a new tab)

id

string

Defined in: generated/model_selection/ParameterGrid.ts:18 (opens in a new tab)

opts

any

Defined in: generated/model_selection/ParameterGrid.ts:19 (opens in a new tab)

Accessors

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/model_selection/ParameterGrid.ts:39 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/model_selection/ParameterGrid.ts:43 (opens in a new tab)