Documentation
Classes
Hyperparameter

Hyperparameter

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

Python Reference (opens in a new tab)

Constructors

constructor()

Signature

new Hyperparameter(opts?: object): Hyperparameter;

Parameters

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

Methods

__call__()

Call self as a function.

Signature

__call__(opts: object): Promise<any>;

Parameters

NameType
optsobject

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:127 (opens in a new tab)

count()

Return number of occurrences of value.

Signature

count(opts: object): Promise<any>;

Parameters

NameType
optsobject

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:153 (opens in a new tab)

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/gaussian_process/kernels/Hyperparameter.ts:110 (opens in a new tab)

index()

Return first index of value.

Raises ValueError if the value is not present.

Signature

index(opts: object): Promise<any>;

Parameters

NameType
optsobject

Returns

Promise<any>

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:181 (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/gaussian_process/kernels/Hyperparameter.ts:66 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:19 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:18 (opens in a new tab)

_py

PythonBridge

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:17 (opens in a new tab)

id

string

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:14 (opens in a new tab)

opts

any

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:15 (opens in a new tab)

Accessors

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:53 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/gaussian_process/kernels/Hyperparameter.ts:57 (opens in a new tab)