class_docstr: Hidden Markov Model with Gaussian emissions.
  
  Attributes
  ----------
  n_features : int
      Dimensionality of the Gaussian emissions.
  
  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.
  
  means_ : array, shape (n_components, n_features)
      Mean parameters for each state.
  
  covars_ : array
      Covariance parameters for each state.
  
      The shape depends on :attr:`covariance_type`:
  
      * (n_components, )                        if "spherical",
      * (n_components, n_features)              if "diag",
      * (n_components, n_features, n_features)  if "full",
      * (n_features, n_features)                if "tied".
  
  Examples
  --------
  >>> from hmmlearn.hmm import GaussianHMM
  >>> GaussianHMM(n_components=2)  #doctest: +ELLIPSIS
  GaussianHMM(algorithm='viterbi',...
class_docstr_tok: ["Hidden","Markov","Model","with","Gaussian","emissions",".","Attributes","--","--","--","--","--","n_features",":","int","Dimensionality","of","the","Gaussian","emissions",".","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",".","means_",":","array",",","shape","(","n_components",",","n_features",")","Mean","parameters","for","each","state",".","covars_",":","array","Covariance","parameters","for","each","state",".","The","shape","depends","on",":","attr",":","`","covariance_type","`",":","*","(","n_components",",",")","if","``","spherical","''",",","*","(","n_components",",","n_features",")","if","``","diag","''",",","*","(","n_components",",","n_features",",","n_features",")","if","``","full","''",",","*","(","n_features",",","n_features",")","if","``","tied","''",".","Examples","--","--","--","--",">",">",">","from","hmmlearn.hmm","import","GaussianHMM",">",">",">","GaussianHMM","(","n_components=2",")","#","doctest",":","+ELLIPSIS","GaussianHMM","(","algorithm='viterbi","'",",","..."]
code: def _init(self, X, lengths=None):
      super()._init(X, lengths)
  
      if self._needs_init("m", "means_"):
          kmeans = cluster.KMeans(
              n_clusters=self.n_components,
              random_state=self.random_state,
              n_init=1,
          )  # sklearn <1.4 backcompat.
          kmeans.fit(X)
          self.means_ = kmeans.cluster_centers_
      if self._needs_init("c", "covars_"):
          cv = np.cov(X.T) + self.min_covar * np.eye(X.shape[1])
          if not cv.shape:
              cv.shape = (1, 1)
          self.covars_ = (
              _utils.distribute_covar_matrix_to_match_covariance_type(
                  cv, self.covariance_type, self.n_components
              ).copy()
          )
  
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 4 for calling the GaussianHMM obj's underlying member method code with example usage: obj._init(X, lengths) without return types