class_docstr: A Coregionalization kernel. The inputs to this kernel are _integers_ (we
  cast them from floats as needed) which usually specify the *outputs* of a
  Coregionalization model.
  
  The kernel function is an indexing of a positive-definite matrix:
  
    K(x, y) = B[x, y] .
  
  To ensure that B is positive-definite, it is specified by the two
  parameters of this kernel, W and kappa:
  
    B = W Wᵀ + diag(kappa) .
  
  We refer to the size of B as "output_dim x output_dim", since this is the
  number of outputs in a coregionalization model. We refer to the number of
  columns on W as 'rank': it is the number of degrees of correlation between
  the outputs.
  
  NB. There is a symmetry between the elements of W, which creates a local
  minimum at W=0. To avoid this, it is recommended to initialize the
  optimization (or MCMC chain) using a random W.
class_docstr_tok: ["A","Coregionalization","kernel",".","The","inputs","to","this","kernel","are","_integers_","(","we","cast","them","from","floats","as","needed",")","which","usually","specify","the","*","outputs","*","of","a","Coregionalization","model",".","The","kernel","function","is","an","indexing","of","a","positive-definite","matrix",":","K","(","x",",","y",")","=","B","[","x",",","y","]",".","To","ensure","that","B","is","positive-definite",",","it","is","specified","by","the","two","parameters","of","this","kernel",",","W","and","kappa",":","B","=","W","W\u1d40","+","diag","(","kappa",")",".","We","refer","to","the","size","of","B","as","``","output_dim","x","output_dim","''",",","since","this","is","the","number","of","outputs","in","a","coregionalization","model",".","We","refer","to","the","number","of","columns","on","W","as","'rank","'",":","it","is","the","number","of","degrees","of","correlation","between","the","outputs",".","NB",".","There","is","a","symmetry","between","the","elements","of","W",",","which","creates","a","local","minimum","at","W=0",".","To","avoid","this",",","it","is","recommended","to","initialize","the","optimization","(","or","MCMC","chain",")","using","a","random","W","."]
docstr: :param output_dim: number of outputs expected (0 <= X < output_dim)
  :param rank: number of degrees of correlation between outputs
docstr_tok: [":","param","output_dim",":","number","of","outputs","expected","(","0","<","=","X","<","output_dim",")",":","param","rank",":","number","of","degrees","of","correlation","between","outputs"]
code: def __init__(
      self,
      output_dim: int,
      rank: int,
      *,
      active_dims: Optional[ActiveDims] = None,
      name: Optional[str] = None,
  ) -> None:
      """
      :param output_dim: number of outputs expected (0 <= X < output_dim)
      :param rank: number of degrees of correlation between outputs
      """
  
      # assert input_dim == 1, "Coregion kernel in 1D only"
      super().__init__(active_dims=active_dims, name=name)
  
      self.output_dim = output_dim
      self.rank = rank
      W: AnyNDArray = 0.1 * np.ones((self.output_dim, self.rank))
      kappa = np.ones(self.output_dim)
      self.W = Parameter(W)
      self.kappa = Parameter(kappa, transform=positive())
  
imports: from typing import Optional
  import numpy
  import tensorflow
  from check_shapes import check_shape
  from check_shapes import check_shapes, inherit_check_shapes
  from ..base import AnyNDArray, Parameter, TensorType
  from ..utilities import positive, to_default_float
  from .base import ActiveDims, Kernel
label_desc: Use image node_id 1 to create a new Coregion object from inherited base classes: Kernel with example: obj = Coregion(output_dim, rank)