class_docstr: Provides the building blocks for representing univariate Gaussian Processes (GPs)
  with Matern kernels as state space models.
  
  :param float nu: The order of the Matern kernel (one of 0.5, 1.5 or 2.5)
  :param int num_gps: the number of GPs
  :param torch.Tensor length_scale_init: optional `num_gps`-dimensional vector of initializers
      for the length scale
  :param torch.Tensor kernel_scale_init: optional `num_gps`-dimensional vector of initializers
      for the kernel scale
  
  **References**
  
  [1] `Kalman Filtering and Smoothing Solutions to Temporal Gaussian Process Regression Models`,
      Jouni Hartikainen and Simo Sarkka.
  [2] `Stochastic Differential Equation Methods for Spatio-Temporal Gaussian Process Regression`,
      Arno Solin.
class_docstr_tok: ["Provides","the","building","blocks","for","representing","univariate","Gaussian","Processes","(","GPs",")","with","Matern","kernels","as","state","space","models",".",":","param","float","nu",":","The","order","of","the","Matern","kernel","(","one","of","0.5",",","1.5","or","2.5",")",":","param","int","num_gps",":","the","number","of","GPs",":","param","torch.Tensor","length_scale_init",":","optional","`","num_gps","`","-dimensional","vector","of","initializers","for","the","length","scale",":","param","torch.Tensor","kernel_scale_init",":","optional","`","num_gps","`","-dimensional","vector","of","initializers","for","the","kernel","scale","*","*","References","*","*","[","1","]","`","Kalman","Filtering","and","Smoothing","Solutions","to","Temporal","Gaussian","Process","Regression","Models","`",",","Jouni","Hartikainen","and","Simo","Sarkka",".","[","2","]","`","Stochastic","Differential","Equation","Methods","for","Spatio-Temporal","Gaussian","Process","Regression","`",",","Arno","Solin","."]
docstr: Compute the (exponentiated) transition matrix of the GP latent space.
  The resulting matrix has layout (num_gps, old_state, new_state), i.e. this
  matrix multiplies states from the right.
  
  See section 5 in reference [1] for details.
  
  :param float dt: the time interval over which the GP latent space evolves.
  :returns torch.Tensor: a 3-dimensional tensor of transition matrices of shape
      (num_gps, state_dim, state_dim).
docstr_tok: ["Compute","the","(","exponentiated",")","transition","matrix","of","the","GP","latent","space",".","The","resulting","matrix","has","layout","(","num_gps",",","old_state",",","new_state",")",",","i.e",".","this","matrix","multiplies","states","from","the","right",".","See","section","5","in","reference","[","1","]","for","details",".",":","param","float","dt",":","the","time","interval","over","which","the","GP","latent","space","evolves",".",":","returns","torch.Tensor",":","a","3-dimensional","tensor","of","transition","matrices","of","shape","(","num_gps",",","state_dim",",","state_dim",")","."]
code: def transition_matrix(self, dt):
      """
      Compute the (exponentiated) transition matrix of the GP latent space.
      The resulting matrix has layout (num_gps, old_state, new_state), i.e. this
      matrix multiplies states from the right.
  
      See section 5 in reference [1] for details.
  
      :param float dt: the time interval over which the GP latent space evolves.
      :returns torch.Tensor: a 3-dimensional tensor of transition matrices of shape
          (num_gps, state_dim, state_dim).
      """
      if self.nu == 0.5:
          rho = self.length_scale.unsqueeze(-1).unsqueeze(-1)
          return torch.exp(-dt / rho)
      elif self.nu == 1.5:
          rho = self.length_scale.unsqueeze(-1).unsqueeze(-1)
          dt_rho = dt / rho
          trans = (
              (1.0 + root_three * dt_rho) * self.mask00
              + (-3.0 * dt_rho / rho) * self.mask01
              + dt * self.mask10
              + (1.0 - root_three * dt_rho) * self.mask11
          )
          return torch.exp(-root_three * dt_rho) * trans
      elif self.nu == 2.5:
          rho = self.length_scale.unsqueeze(-1).unsqueeze(-1)
          dt_rho = root_five * dt / rho
          dt_rho_sq = dt_rho.pow(2.0)
          dt_rho_cu = dt_rho.pow(3.0)
          dt_rho_qu = dt_rho.pow(4.0)
          dt_sq = dt**2.0
          trans = (
              (1.0 + dt_rho + 0.5 * dt_rho_sq) * self.mask00
              + (-0.5 * dt_rho_cu / dt) * self.mask01
              + ((0.5 * dt_rho_qu - dt_rho_cu) / dt_sq) * self.mask02
              + ((dt_rho + 1.0) * dt) * self.mask10
              + (1.0 + dt_rho - dt_rho_sq) * self.mask11
              + ((dt_rho_cu - 3.0 * dt_rho_sq) / dt) * self.mask12
              + (0.5 * dt_sq) * self.mask20
              + ((1.0 - 0.5 * dt_rho) * dt) * self.mask21
              + (1.0 - 2.0 * dt_rho + 0.5 * dt_rho_sq) * self.mask22
          )
          return torch.exp(-dt_rho) * trans
  
file_path: pyro/pyro/ops/ssm_gp.py
imports: import math
  import torch
  from torch.distributions import constraints
  from pyro.nn import PyroModule, PyroParam, pyro_method
label_desc: Use image node_id 2 for calling the MaternKernel obj's underlying member method code with example usage: obj.transition_matrix(dt) and returns: torch, unknown, unknown