Class: Hyperparameter
A kernel hyperparameter’s specification in form of a namedtuple.
Constructors
new Hyperparameter()
new Hyperparameter(
opts
?):Hyperparameter
Parameters
Parameter | Type | Description |
---|---|---|
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 ? | boolean | Whether 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 ? | number | The 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 ? | string | The 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 ? | string | The type of the hyperparameter. Currently, only “numeric” hyperparameters are supported. |
Returns Hyperparameter
Defined in generated/gaussian_process/kernels/Hyperparameter.ts:21
Properties
Property | Type | Default value | Defined in |
---|---|---|---|
_isDisposed | boolean | false | generated/gaussian_process/kernels/Hyperparameter.ts:19 |
_isInitialized | boolean | false | generated/gaussian_process/kernels/Hyperparameter.ts:18 |
_py | PythonBridge | undefined | generated/gaussian_process/kernels/Hyperparameter.ts:17 |
id | string | undefined | generated/gaussian_process/kernels/Hyperparameter.ts:14 |
opts | any | undefined | generated/gaussian_process/kernels/Hyperparameter.ts:15 |
Accessors
py
Get Signature
get py():
PythonBridge
Returns PythonBridge
Set Signature
set py(
pythonBridge
):void
Parameters
Parameter | Type |
---|---|
pythonBridge | PythonBridge |
Returns void
Defined in generated/gaussian_process/kernels/Hyperparameter.ts:53
Methods
count()
count(
opts
):Promise
<any
>
Return number of occurrences of value.
Parameters
Parameter | Type |
---|---|
opts | object |
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
Parameter | Type |
---|---|
opts | object |
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
Parameter | Type |
---|---|
py | PythonBridge |
Returns Promise
<void
>
Defined in generated/gaussian_process/kernels/Hyperparameter.ts:66