geometric_kernels.frontends.gpflow ================================== .. py:module:: geometric_kernels.frontends.gpflow .. autoapi-nested-parse:: GPflow kernel wrapper. A tutorial on how to use this wrapper to run Gaussian process regression on a geometric space is available in the :doc:`frontends/GPflow.ipynb ` notebook. Module Contents --------------- .. py:class:: DefaultFloatZeroMeanFunction(output_dim = 1) Bases: :py:obj:`gpflow.mean_functions.Constant` Zero mean function. The default GPflow's `ZeroMeanFunction` uses the input's dtype as output type, this minor adaptation uses GPflow's `default_float` instead. This is to allow integer-valued inputs, like in the case of :class:`~.spaces.Graph` and :class:`~.spaces.Mesh`. .. py:class:: GPflowGeometricKernel(base_kernel, active_dims = None, name = None, lengthscales = None, nu = None, variance = 1.0, trainable_nu = False) Bases: :py:obj:`gpflow.kernels.Kernel` GPflow wrapper for :class:`~.kernels.BaseGeometricKernel`. A tutorial on how to use this wrapper to run Gaussian process regression on a geometric space is available in the :doc:`frontends/GPflow.ipynb ` notebook. .. note:: Remember that the `base_kernel` itself does not store any of its hyperparameters (like `lengthscale` and `nu`). If you do not set them manually—when initializing the object or after, by setting the properties—this wrapper will use the values provided by `base_kernel.init_params`. .. note:: As customary in GPflow, this wrapper calls the length scale parameter `lengthscales` (plural), as opposed to the convention used by GeometricKernels, where we call it `lengthscale` (singular). :param base_kernel: The kernel to wrap. :param active_dims: Active dimensions, either a slice or list of indices into the columns of X (inherited from `gpflow.kernels.base.Kernel`). :param name: Optional kernel name (inherited from `gpflow.kernels.base.Kernel`). :param lengthscales: Initial value of the length scale. Note **s** in lengthscale\ **s**\ . If not given or set to None, uses the default value of the `base_kernel`, as provided by its `init_params` method. :param nu: Initial value of the smoothness parameter nu. If not given or set to None, uses the default value of the `base_kernel`, as provided by its `init_params` method. :param variance: Initial value of the variance (outputscale) parameter. Defaults to 1.0. :param trainable_nu: Whether or not the parameter nu is to be optimized over. Cannot be True if nu is equal to infinity. You cannot change this parameter after constructing the object. Defaults to False. :raises ValueError: If trying to set nu = infinity together with trainable_nu = True. .. py:method:: K(X, X2 = None) Evaluate the covariance matrix K(X, X2) (or K(X, X) if X2=None). .. py:method:: K_diag(X) Evaluate the diagonal of the covariance matrix K(X, X). .. py:property:: space :type: beartype.typing.Union[geometric_kernels.spaces.Space, beartype.typing.List[geometric_kernels.spaces.Space]] Alias to the `base_kernel`\ s space property.