class_docstr: Hidden Markov Model with Poisson emissions.
  
  Attributes
  ----------
  monitor_ : ConvergenceMonitor
      Monitor object used to check the convergence of EM.
  
  startprob_ : array, shape (n_components, )
      Initial state occupation distribution.
  
  transmat_ : array, shape (n_components, n_components)
      Matrix of transition probabilities between states.
  
  lambdas_ : array, shape (n_components, n_features)
      The expectation value of the waiting time parameters for each
      feature in a given state.
class_docstr_tok: ["Hidden","Markov","Model","with","Poisson","emissions",".","Attributes","--","--","--","--","--","monitor_",":","ConvergenceMonitor","Monitor","object","used","to","check","the","convergence","of","EM",".","startprob_",":","array",",","shape","(","n_components",",",")","Initial","state","occupation","distribution",".","transmat_",":","array",",","shape","(","n_components",",","n_components",")","Matrix","of","transition","probabilities","between","states",".","lambdas_",":","array",",","shape","(","n_components",",","n_features",")","The","expectation","value","of","the","waiting","time","parameters","for","each","feature","in","a","given","state","."]
code: def _init(self, X, lengths=None):
      super()._init(X, lengths)
      self.random_state = check_random_state(self.random_state)
  
      mean_X = X.mean()
      var_X = X.var()
  
      if self._needs_init("l", "lambdas_"):
          # initialize with method of moments based on X
          self.lambdas_ = self.random_state.gamma(
              shape=mean_X**2 / var_X,
              scale=var_X / mean_X,  # numpy uses theta = 1 / beta
              size=(self.n_components, self.n_features),
          )
  
imports: import logging
  import numpy
  from scipy import linalg
  from sklearn import cluster
  from sklearn.utils import check_random_state
  from .None import _emissions, _utils
  from .base import BaseHMM
  from .utils import fill_covars, normalize
label_desc: Use image node_id 2 for calling the PoissonHMM obj's underlying member method code with example usage: obj._init(X, lengths) without return types