class_docstr: An exponential distribution object.
  
  An exponential distribution models scales of discrete events, and has a
  rate parameter describing the average time between event occurances.
  This distribution assumes that each feature is independent of the others.
  Although the object is meant to operate on discrete counts, it can be used
  on any non-negative continuous data.
  
  There are two ways to initialize this object. The first is to pass in
  the tensor of rate parameters, at which point they can immediately be
  used. The second is to not pass in the rate parameters and then call
  either `fit` or `summary` + `from_summaries`, at which point the rate
  parameter will be learned from data.
  
  
  Parameters
  ----------
  scales: list, numpy.ndarray, torch.Tensor or None, shape=(d,), optional
          The rate parameters for each feature. Default is None.
  
  inertia: float, (0, 1), optional
          Indicates the proportion of the update to apply to the parameters
          during training. When the inertia is 0.0, the update is applied in
          its entirety and the previous parameters are ignored. When the
          inertia is 1.0, the update is entirely ignored and the previous
          parameters are kept, equivalently to if the parameters were frozen.
  
  frozen: bool, optional
          Whether all the parameters associated with this distribution are 
          frozen. If you want to freeze individual pameters, or individual values 
          in those parameters, you must modify the `frozen` attribute of the 
          tensor or parameter directly. Default is False.
  
  check_data: bool, optional
          Whether to check properties of the data and potentially recast it to
          torch.tensors. This does not prevent checking of parameters but can
          slightly speed up computation when you know that your inputs are valid.
          Setting this to False is also necessary for compiling.
class_docstr_tok: ["An","exponential","distribution","object",".","An","exponential","distribution","models","scales","of","discrete","events",",","and","has","a","rate","parameter","describing","the","average","time","between","event","occurances",".","This","distribution","assumes","that","each","feature","is","independent","of","the","others",".","Although","the","object","is","meant","to","operate","on","discrete","counts",",","it","can","be","used","on","any","non-negative","continuous","data",".","There","are","two","ways","to","initialize","this","object",".","The","first","is","to","pass","in","the","tensor","of","rate","parameters",",","at","which","point","they","can","immediately","be","used",".","The","second","is","to","not","pass","in","the","rate","parameters","and","then","call","either","`","fit","`","or","`","summary","`","+","`","from_summaries","`",",","at","which","point","the","rate","parameter","will","be","learned","from","data",".","Parameters","--","--","--","--","--","scales",":","list",",","numpy.ndarray",",","torch.Tensor","or","None",",","shape=","(","d",",",")",",","optional","The","rate","parameters","for","each","feature",".","Default","is","None",".","inertia",":","float",",","(","0",",","1",")",",","optional","Indicates","the","proportion","of","the","update","to","apply","to","the","parameters","during","training",".","When","the","inertia","is","0.0",",","the","update","is","applied","in","its","entirety","and","the","previous","parameters","are","ignored",".","When","the","inertia","is","1.0",",","the","update","is","entirely","ignored","and","the","previous","parameters","are","kept",",","equivalently","to","if","the","parameters","were","frozen",".","frozen",":","bool",",","optional","Whether","all","the","parameters","associated","with","this","distribution","are","frozen",".","If","you","want","to","freeze","individual","pameters",",","or","individual","values","in","those","parameters",",","you","must","modify","the","`","frozen","`","attribute","of","the","tensor","or","parameter","directly",".","Default","is","False",".","check_data",":","bool",",","optional","Whether","to","check","properties","of","the","data","and","potentially","recast","it","to","torch.tensors",".","This","does","not","prevent","checking","of","parameters","but","can","slightly","speed","up","computation","when","you","know","that","your","inputs","are","valid",".","Setting","this","to","False","is","also","necessary","for","compiling","."]
docstr: Initialize the probability distribution.
  
  This method is meant to only be called internally. It initializes the
  parameters of the distribution and stores its dimensionality. For more
  complex methods, this function will do more.
  
  
  Parameters
  ----------
  d: int
          The dimensionality the distribution is being initialized to.
docstr_tok: ["Initialize","the","probability","distribution",".","This","method","is","meant","to","only","be","called","internally",".","It","initializes","the","parameters","of","the","distribution","and","stores","its","dimensionality",".","For","more","complex","methods",",","this","function","will","do","more",".","Parameters","--","--","--","--","--","d",":","int","The","dimensionality","the","distribution","is","being","initialized","to","."]
code: def _initialize(self, d):
      """Initialize the probability distribution.
  
      This method is meant to only be called internally. It initializes the
      parameters of the distribution and stores its dimensionality. For more
      complex methods, this function will do more.
  
  
      Parameters
      ----------
      d: int
              The dimensionality the distribution is being initialized to.
      """
  
      self.scales = _cast_as_parameter(
          torch.zeros(d, dtype=self.dtype, device=self.device)
      )
  
      self._initialized = True
      super()._initialize(d)
  
file_path: pomegranate/pomegranate/distributions/exponential.py
imports: import torch
  from torch.distributions import Exponential
  from .._utils import _cast_as_tensor
  from .._utils import _cast_as_parameter
  from .._utils import _update_parameter
  from .._utils import _check_parameter
  from ._distribution import Distribution
label_desc: Use image node_id 2 for calling the Exponential obj's underlying member method code with example usage: obj._initialize(d) without return types