class_docstr: NCP (Nearly-Constant Position) dynamic model. May be subclassed, e.g., with
  CWNV (Continuous White Noise Velocity) or DWNV (Discrete White Noise
  Velocity).
  
  :param dimension: native state dimension.
  :param sv2: variance of velocity. Usually chosen so that the standard
        deviation is roughly half of the max velocity one would ever expect
        to observe.
class_docstr_tok: ["NCP","(","Nearly-Constant","Position",")","dynamic","model",".","May","be","subclassed",",","e.g.",",","with","CWNV","(","Continuous","White","Noise","Velocity",")","or","DWNV","(","Discrete","White","Noise","Velocity",")",".",":","param","dimension",":","native","state","dimension",".",":","param","sv2",":","variance","of","velocity",".","Usually","chosen","so","that","the","standard","deviation","is","roughly","half","of","the","max","velocity","one","would","ever","expect","to","observe","."]
code: def __init__(self, dimension, sv2):
      dimension_pv = 2 * dimension
      super().__init__(
          dimension, dimension_pv, num_process_noise_parameters=1
      )
      if not isinstance(sv2, torch.Tensor):
          sv2 = torch.tensor(sv2)
      self.sv2 = Parameter(sv2)
      self._F_cache = eye_like(
          sv2, dimension
      )  # State transition matrix cache
      self._Q_cache = {}
  
imports: from abc import ABCMeta, abstractmethod
  import torch
  from torch import nn
  from torch.nn import Parameter
  import pyro.distributions
  from pyro.distributions.util import eye_like
label_desc: Use image node_id 1 to create a new Ncp object from inherited base classes: DifferentiableDynamicModel with example: obj = Ncp(dimension, sv2)