syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.kernel.product_kernel module

class syne_tune.optimizer.schedulers.searchers.bayesopt.gpautograd.kernel.product_kernel.ProductKernelFunction(kernel1, kernel2, name_prefixes=None, **kwargs)[source]

Bases: KernelFunction

Given two kernel functions K1, K2, this class represents the product kernel function given by

\[((x_1, x_2), (y_1, y_2)) \mapsto K(x_1, y_1) \cdot K(x_2, y_2)\]

We assume that parameters of K1 and K2 are disjoint.

forward(X1, X2)[source]

Overrides to implement forward computation using NDArray. Only accepts positional arguments. Parameters ———- *args : list of NDArray

Input tensors.

diagonal(X)[source]
Parameters:

X – Input data, shape (n, d)

Returns:

Diagonal of \(k(X, X)\), shape (n,)

diagonal_depends_on_X()[source]

For stationary kernels, diagonal does not depend on X

Returns:

Does diagonal() depend on X?

param_encoding_pairs()[source]

Note: We assume that K1 and K2 have disjoint parameters, otherwise there will be a redundancy here.

get_params()[source]
Return type:

Dict[str, Any]

Returns:

Dictionary with hyperparameter values

set_params(param_dict)[source]
Parameters:

param_dict (Dict[str, Any]) – Dictionary with new hyperparameter values

Returns: