Skip to content

Graph kernel

neps.optimizers.bayesian_optimization.kernels.graph_kernel #

GraphKernels #

GraphKernels(**kwargs)
Source code in neps/optimizers/bayesian_optimization/kernels/graph_kernel.py
def __init__(self, **kwargs):
    super().__init__(**kwargs)
    self.n_hyperparameters = 0
    self.rbf_lengthscale = False
    self.kern = None
    self.__name__ = "GraphKernelBase"

forward_t #

forward_t(gr2, gr1: list = None)

Compute the derivative of the kernel function k(phi, phi) with respect to phi (the training point)

Source code in neps/optimizers/bayesian_optimization/kernels/graph_kernel.py
def forward_t(self, gr2, gr1: list = None):
    """
    Compute the derivative of the kernel function k(phi, phi*) with respect to phi* (the training point)
    """
    raise NotImplementedError(
        "The kernel gradient is not implemented for the graph kernel called!"
    )