class_docstr: A time series model in which each output dimension is modeled independently
  with a univariate Gaussian Process with a Matern kernel. The targets are assumed
  to be evenly spaced in time. Training and inference are logarithmic in the length
  of the time series T.
  
  :param float nu: The order of the Matern kernel; one of 0.5, 1.5 or 2.5.
  :param float dt: The time spacing between neighboring observations of the time series.
  :param int obs_dim: The dimension of the targets at each time step.
  :param torch.Tensor length_scale_init: optional initial values for the kernel length scale
      given as a ``obs_dim``-dimensional tensor
  :param torch.Tensor kernel_scale_init: optional initial values for the kernel scale
      given as a ``obs_dim``-dimensional tensor
  :param torch.Tensor obs_noise_scale_init: optional initial values for the observation noise scale
      given as a ``obs_dim``-dimensional tensor
class_docstr_tok: ["A","time","series","model","in","which","each","output","dimension","is","modeled","independently","with","a","univariate","Gaussian","Process","with","a","Matern","kernel",".","The","targets","are","assumed","to","be","evenly","spaced","in","time",".","Training","and","inference","are","logarithmic","in","the","length","of","the","time","series","T.",":","param","float","nu",":","The","order","of","the","Matern","kernel",";","one","of","0.5",",","1.5","or","2.5.",":","param","float","dt",":","The","time","spacing","between","neighboring","observations","of","the","time","series",".",":","param","int","obs_dim",":","The","dimension","of","the","targets","at","each","time","step",".",":","param","torch.Tensor","length_scale_init",":","optional","initial","values","for","the","kernel","length","scale","given","as","a","``","obs_dim","``","-dimensional","tensor",":","param","torch.Tensor","kernel_scale_init",":","optional","initial","values","for","the","kernel","scale","given","as","a","``","obs_dim","``","-dimensional","tensor",":","param","torch.Tensor","obs_noise_scale_init",":","optional","initial","values","for","the","observation","noise","scale","given","as","a","``","obs_dim","``","-dimensional","tensor"]
code: def __init__(
      self,
      nu=1.5,
      dt=1.0,
      obs_dim=1,
      length_scale_init=None,
      kernel_scale_init=None,
      obs_noise_scale_init=None,
  ):
      self.nu = nu
      self.dt = dt
      self.obs_dim = obs_dim
  
      if obs_noise_scale_init is None:
          obs_noise_scale_init = 0.2 * torch.ones(obs_dim)
      assert obs_noise_scale_init.shape == (obs_dim,)
  
      super().__init__()
  
      self.kernel = MaternKernel(
          nu=nu,
          num_gps=obs_dim,
          length_scale_init=length_scale_init,
          kernel_scale_init=kernel_scale_init,
      )
  
      self.obs_noise_scale = PyroParam(
          obs_noise_scale_init, constraint=constraints.positive
      )
  
      obs_matrix = [1.0] + [0.0] * (self.kernel.state_dim - 1)
      self.register_buffer(
          "obs_matrix", torch.tensor(obs_matrix).unsqueeze(-1)
      )
  
imports: import math
  import torch
  import torch.nn
  from torch.distributions import MultivariateNormal, constraints
  import pyro.distributions
  from pyro.contrib.timeseries.base import TimeSeriesModel
  from pyro.nn import PyroParam, pyro_method
  from pyro.ops.ssm_gp import MaternKernel
  from pyro.ops.tensor_utils import block_diag_embed
label_desc: Use image node_id 1 to create a new IndependentMaternGP object from inherited base classes: TimeSeriesModel with example: obj = IndependentMaternGP(nu, dt, obs_dim, length_scale_init, kernel_scale_init, obs_noise_scale_init)