DocumentationClassesHyperparameter

Class: Hyperparameter

A kernel hyperparameter’s specification in form of a namedtuple.

Python Reference

Constructors

new Hyperparameter()

new Hyperparameter(opts?): Hyperparameter

Parameters

ParameterTypeDescription
opts?object-
opts.bounds?"fixed"The lower and upper bound on the parameter. If n_elements>1, a pair of 1d array with n_elements each may be given alternatively. If the string “fixed” is passed as bounds, the hyperparameter’s value cannot be changed.
opts.fixed?booleanWhether the value of this hyperparameter is fixed, i.e., cannot be changed during hyperparameter tuning. If undefined is passed, the “fixed” is derived based on the given bounds.
opts.n_elements?numberThe number of elements of the hyperparameter value. Defaults to 1, which corresponds to a scalar hyperparameter. n_elements > 1 corresponds to a hyperparameter which is vector-valued, such as, e.g., anisotropic length-scales.
opts.name?stringThe name of the hyperparameter. Note that a kernel using a hyperparameter with name “x” must have the attributes self.x and self.x_bounds
opts.value_type?stringThe type of the hyperparameter. Currently, only “numeric” hyperparameters are supported.

Returns Hyperparameter

Defined in generated/gaussian_process/kernels/Hyperparameter.ts:21

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/gaussian_process/kernels/Hyperparameter.ts:19
_isInitializedbooleanfalsegenerated/gaussian_process/kernels/Hyperparameter.ts:18
_pyPythonBridgeundefinedgenerated/gaussian_process/kernels/Hyperparameter.ts:17
idstringundefinedgenerated/gaussian_process/kernels/Hyperparameter.ts:14
optsanyundefinedgenerated/gaussian_process/kernels/Hyperparameter.ts:15

Accessors

py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/gaussian_process/kernels/Hyperparameter.ts:53

Methods

count()

count(opts): Promise<any>

Return number of occurrences of value.

Parameters

ParameterType
optsobject

Returns Promise<any>

Defined in generated/gaussian_process/kernels/Hyperparameter.ts:122


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/gaussian_process/kernels/Hyperparameter.ts:105


index()

index(opts): Promise<any>

Return first index of value.

Raises ValueError if the value is not present.

Parameters

ParameterType
optsobject

Returns Promise<any>

Defined in generated/gaussian_process/kernels/Hyperparameter.ts:150


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/gaussian_process/kernels/Hyperparameter.ts:66