Skip to content

Latest commit

 

History

History
160 lines (91 loc) · 4.92 KB

ParameterSampler.md

File metadata and controls

160 lines (91 loc) · 4.92 KB

ParameterSampler

Generator on parameters sampled from given distributions.

Non-deterministic iterable over random candidate combinations for hyper- parameter search. If all parameters are presented as a list, sampling without replacement is performed. If at least one parameter is given as a distribution, sampling with replacement is used. It is highly recommended to use continuous distributions for continuous parameters.

Read more in the User Guide.

Python Reference

Constructors

constructor()

Signature

new ParameterSampler(opts?: object): ParameterSampler;

Parameters

Name Type Description
opts? object -
opts.n_iter? number Number of parameter settings that are produced.
opts.param_distributions? any Dictionary with parameters names (str) as keys and distributions or lists of parameters to try. Distributions must provide a rvs method for sampling (such as those from scipy.stats.distributions). If a list is given, it is sampled uniformly. If a list of dicts is given, first a dict is sampled uniformly, and then a parameter is sampled using that dict as above.
opts.random_state? number Pseudo random number generator state used for random uniform sampling from lists of possible values instead of scipy.stats distributions. Pass an int for reproducible output across multiple function calls. See Glossary.

Returns

ParameterSampler

Defined in: generated/model_selection/ParameterSampler.ts:25

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/ParameterSampler.ts:102

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

Name Type
py PythonBridge

Returns

Promise<void>

Defined in: generated/model_selection/ParameterSampler.ts:58

Properties

_isDisposed

boolean = false

Defined in: generated/model_selection/ParameterSampler.ts:23

_isInitialized

boolean = false

Defined in: generated/model_selection/ParameterSampler.ts:22

_py

PythonBridge

Defined in: generated/model_selection/ParameterSampler.ts:21

id

string

Defined in: generated/model_selection/ParameterSampler.ts:18

opts

any

Defined in: generated/model_selection/ParameterSampler.ts:19

Accessors

params

Yields* dictionaries mapping each estimator parameter to as sampled value.

Signature

params(): Promise<any>;

Returns

Promise<any>

Defined in: generated/model_selection/ParameterSampler.ts:119

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/model_selection/ParameterSampler.ts:45

Signature

py(pythonBridge: PythonBridge): void;

Parameters

Name Type
pythonBridge PythonBridge

Returns

void

Defined in: generated/model_selection/ParameterSampler.ts:49