From ee7f23869bf336d547616a2faf6d5b7030d24835 Mon Sep 17 00:00:00 2001 From: Siivola Eero Date: Wed, 5 Sep 2018 17:58:44 +0300 Subject: [PATCH] Added copyrights and documentation to new models and kernels --- GPy/kern/src/diff_kern.py | 12 +++++++++++- GPy/kern/src/multioutput_derivative_kern.py | 3 +++ GPy/kern/src/multioutput_kern.py | 3 +++ GPy/models/multioutput_gp.py | 18 ++++++------------ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/GPy/kern/src/diff_kern.py b/GPy/kern/src/diff_kern.py index 8f505b4a..2c141ef5 100644 --- a/GPy/kern/src/diff_kern.py +++ b/GPy/kern/src/diff_kern.py @@ -1,9 +1,19 @@ +# Copyright (c) 2018, GPy authors (see AUTHORS.txt). +# Licensed under the BSD 3-clause license (see LICENSE.txt) from .kern import CombinationKernel import numpy as np from paramz.caching import Cache_this -# A thin wrapper around the base kernel to tell that we are dealing with a partial derivative of a Kernel class DiffKern(CombinationKernel): + """ + Diff kernel is a thin wrapper for using partial derivatives of kernels as kernels. Eg. in combination with + Multioutput kernel this allows the user to train GPs with observations of latent function and latent + function derivatives + + The parameters the kernel needs are: + -'base_kern': a member of Kernel class that is used for observations + -'dimension': integer that indigates in which dimensions the partial derivative observations are + """ def __init__(self, base_kern, dimension): super(DiffKern, self).__init__([base_kern], 'DiffKern') self.base_kern = base_kern diff --git a/GPy/kern/src/multioutput_derivative_kern.py b/GPy/kern/src/multioutput_derivative_kern.py index 33408a00..0a969239 100644 --- a/GPy/kern/src/multioutput_derivative_kern.py +++ b/GPy/kern/src/multioutput_derivative_kern.py @@ -1,3 +1,6 @@ +# Copyright (c) 2018, GPy authors (see AUTHORS.txt). +# Licensed under the BSD 3-clause license (see LICENSE.txt) + from .kern import Kern, CombinationKernel from .multioutput_kern import MultioutputKern, ZeroKern import numpy as np diff --git a/GPy/kern/src/multioutput_kern.py b/GPy/kern/src/multioutput_kern.py index bc2a3a8c..cfb06bb2 100644 --- a/GPy/kern/src/multioutput_kern.py +++ b/GPy/kern/src/multioutput_kern.py @@ -1,3 +1,6 @@ +# Copyright (c) 2018, GPy authors (see AUTHORS.txt). +# Licensed under the BSD 3-clause license (see LICENSE.txt) + from .kern import Kern, CombinationKernel import numpy as np from functools import reduce, partial diff --git a/GPy/models/multioutput_gp.py b/GPy/models/multioutput_gp.py index 35c0f3fe..a49a7bfe 100644 --- a/GPy/models/multioutput_gp.py +++ b/GPy/models/multioutput_gp.py @@ -22,19 +22,13 @@ logger = logging.getLogger("GP") class MultioutputGP(GP): """ - General purpose Gaussian process model - :param X: input observations - :param Y: output observations - :param kernel: a GPy kernel, defaults to rbf+white - :param likelihood: a GPy likelihood + Gaussian process model for using observations from multiple likelihoods and different kernels + :param X_list: input observations in a list for each likelihood + :param Y: output observations in a list for each likelihood + :param kernel_list: kernels in a list for each likelihood + :param likelihood_list: likelihoods in a list + :param kernel_cross_covariances: Cross covariances between different likelihoods. See class MultioutputKern for more :param inference_method: The :class:`~GPy.inference.latent_function_inference.LatentFunctionInference` inference method to use for this GP - :rtype: model object - :param Norm normalizer: - normalize the outputs Y. - Prediction will be un-normalized using this normalizer. - If normalizer is None, we will normalize using Standardize. - If normalizer is False, no normalization will be done. - .. Note:: Multiple independent outputs are allowed using columns of Y """ def __init__(self, X_list, Y_list, kernel_list, likelihood_list, name='multioutputgp', kernel_cross_covariances={}, inference_method=None): #Input and Output