mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 13:32:39 +02:00
coregionalisation changed to coregionalization
This commit is contained in:
parent
1bc9374717
commit
4bb2ea9606
9 changed files with 24 additions and 79 deletions
|
|
@ -340,7 +340,7 @@ def symmetric(k):
|
|||
k_.parts = [symmetric.Symmetric(p) for p in k.parts]
|
||||
return k_
|
||||
|
||||
def coregionalise(num_outputs,W_columns=1, W=None, kappa=None):
|
||||
def coregionalize(num_outputs,W_columns=1, W=None, kappa=None):
|
||||
"""
|
||||
Coregionlization matrix B, of the form:
|
||||
.. math::
|
||||
|
|
@ -352,18 +352,18 @@ def coregionalise(num_outputs,W_columns=1, W=None, kappa=None):
|
|||
|
||||
it is obtainded as the tensor product between a kernel k(x,y) and B.
|
||||
|
||||
:param num_outputs: the number of outputs to corregionalise
|
||||
:param num_outputs: the number of outputs to coregionalize
|
||||
:type num_outputs: int
|
||||
:param W_columns: number of columns of the W matrix (this parameter is ignored if parameter W is not None)
|
||||
:type W_colunns: int
|
||||
:param W: a low rank matrix that determines the correlations between the different outputs, together with kappa it forms the coregionalisation matrix B
|
||||
:param W: a low rank matrix that determines the correlations between the different outputs, together with kappa it forms the coregionalization matrix B
|
||||
:type W: numpy array of dimensionality (num_outpus, W_columns)
|
||||
:param kappa: a vector which allows the outputs to behave independently
|
||||
:type kappa: numpy array of dimensionality (num_outputs,)
|
||||
:rtype: kernel object
|
||||
|
||||
"""
|
||||
p = parts.coregionalise.Coregionalise(num_outputs,W_columns,W,kappa)
|
||||
p = parts.coregionalize.Coregionalize(num_outputs,W_columns,W,kappa)
|
||||
return kern(1,[p])
|
||||
|
||||
|
||||
|
|
@ -442,11 +442,11 @@ def build_lcm(input_dim, num_outputs, kernel_list = [], W_columns=1,W=None,kappa
|
|||
k.input_dim = input_dim
|
||||
warnings.warn("kernel's input dimension overwritten to fit input_dim parameter.")
|
||||
|
||||
k_coreg = coregionalise(num_outputs,W_columns,W,kappa)
|
||||
k_coreg = coregionalize(num_outputs,W_columns,W,kappa)
|
||||
kernel = kernel_list[0]**k_coreg.copy()
|
||||
|
||||
for k in kernel_list[1:]:
|
||||
k_coreg = coregionalise(num_outputs,W_columns,W,kappa)
|
||||
k_coreg = coregionalize(num_outputs,W_columns,W,kappa)
|
||||
kernel += k**k_coreg.copy()
|
||||
|
||||
return kernel
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import bias
|
||||
import Brownian
|
||||
import coregionalise
|
||||
import coregionalize
|
||||
import exponential
|
||||
import finite_dimensional
|
||||
import fixed
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from GPy.util.linalg import mdot, pdinv
|
|||
import pdb
|
||||
from scipy import weave
|
||||
|
||||
class Coregionalise(Kernpart):
|
||||
class Coregionalize(Kernpart):
|
||||
"""
|
||||
Kernel for intrinsic/linear coregionalization models
|
||||
|
||||
|
|
@ -25,12 +25,12 @@ class Coregionalise(Kernpart):
|
|||
:type num_outputs: int
|
||||
:param W_columns: number of columns of the W matrix (this parameter is ignored if parameter W is not None)
|
||||
:type W_colunns: int
|
||||
:param W: a low rank matrix that determines the correlations between the different outputs, together with kappa it forms the coregionalisation matrix B
|
||||
:param W: a low rank matrix that determines the correlations between the different outputs, together with kappa it forms the coregionalization matrix B
|
||||
:type W: numpy array of dimensionality (num_outpus, W_columns)
|
||||
:param kappa: a vector which allows the outputs to behave independently
|
||||
:type kappa: numpy array of dimensionality (num_outputs,)
|
||||
|
||||
.. Note: see coregionalisation examples in GPy.examples.regression for some usage.
|
||||
.. Note: see coregionalization examples in GPy.examples.regression for some usage.
|
||||
"""
|
||||
def __init__(self,num_outputs,W_columns=1, W=None, kappa=None):
|
||||
self.input_dim = 1
|
||||
|
|
@ -18,7 +18,7 @@ class Prod(Kernpart):
|
|||
"""
|
||||
def __init__(self,k1,k2,tensor=False):
|
||||
self.num_params = k1.num_params + k2.num_params
|
||||
self.name = '['+k1.name + '(x)' + k2.name +']'
|
||||
self.name = '['+k1.name + '**' + k2.name +']'
|
||||
self.k1 = k1
|
||||
self.k2 = k2
|
||||
if tensor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue