class_docstr: Hidden Markov Model with categorical (discrete) emissions trained
  using Variational Inference.
  
  References:
      * https://cse.buffalo.edu/faculty/mbeal/thesis/
  
  Attributes
  ----------
  n_features : int
      Number of possible symbols emitted by the model (in the samples).
  
  monitor_ : ConvergenceMonitor
      Monitor object used to check the convergence of EM.
  
  startprob_prior_ : array, shape (n_components, )
      Prior for the initial state occupation distribution.
  
  startprob_posterior_ : array, shape (n_components, )
      Posterior estimate of the state occupation distribution.
  
  transmat_prior_ : array, shape (n_components, n_components)
      Prior for the matrix of transition probabilities between states.
  
  transmat_posterior_ : array, shape (n_components, n_components)
      Posterior estimate of the transition probabilities between states.
  
  emissionprob_prior_ : array, shape (n_components, n_features)
      Prior estimatate of emitting a given symbol when in each state.
  
  emissionprob_posterior_ : array, shape (n_components, n_features)
      Posterior estimate of emitting a given symbol when in each state.
  
  Examples
  --------
  >>> from hmmlearn.hmm import VariationalCategoricalHMM
  >>> VariationalCategoricalHMM(n_components=2)  #doctest: +ELLIPSIS
  VariationalCategoricalHMM(algorithm='viterbi',...
class_docstr_tok: ["Hidden","Markov","Model","with","categorical","(","discrete",")","emissions","trained","using","Variational","Inference",".","References",":","*","https",":","\/\/cse.buffalo.edu\/faculty\/mbeal\/thesis\/","Attributes","--","--","--","--","--","n_features",":","int","Number","of","possible","symbols","emitted","by","the","model","(","in","the","samples",")",".","monitor_",":","ConvergenceMonitor","Monitor","object","used","to","check","the","convergence","of","EM",".","startprob_prior_",":","array",",","shape","(","n_components",",",")","Prior","for","the","initial","state","occupation","distribution",".","startprob_posterior_",":","array",",","shape","(","n_components",",",")","Posterior","estimate","of","the","state","occupation","distribution",".","transmat_prior_",":","array",",","shape","(","n_components",",","n_components",")","Prior","for","the","matrix","of","transition","probabilities","between","states",".","transmat_posterior_",":","array",",","shape","(","n_components",",","n_components",")","Posterior","estimate","of","the","transition","probabilities","between","states",".","emissionprob_prior_",":","array",",","shape","(","n_components",",","n_features",")","Prior","estimatate","of","emitting","a","given","symbol","when","in","each","state",".","emissionprob_posterior_",":","array",",","shape","(","n_components",",","n_features",")","Posterior","estimate","of","emitting","a","given","symbol","when","in","each","state",".","Examples","--","--","--","--",">",">",">","from","hmmlearn.hmm","import","VariationalCategoricalHMM",">",">",">","VariationalCategoricalHMM","(","n_components=2",")","#","doctest",":","+ELLIPSIS","VariationalCategoricalHMM","(","algorithm='viterbi","'",",","..."]
docstr: Initialize model parameters prior to fitting.
  
  Parameters
  ----------
  X : array-like, shape (n_samples, n_features)
      Feature matrix of individual samples.
  lengths : array-like of integers, shape (n_sequences, )
      Lengths of the individual sequences in ``X``. The sum of
      these should be ``n_samples``.
docstr_tok: ["Initialize","model","parameters","prior","to","fitting",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","Feature","matrix","of","individual","samples",".","lengths",":","array-like","of","integers",",","shape","(","n_sequences",",",")","Lengths","of","the","individual","sequences","in","``","X","``",".","The","sum","of","these","should","be","``","n_samples","``","."]
code: def _init(self, X, lengths):
      """
      Initialize model parameters prior to fitting.
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          Feature matrix of individual samples.
      lengths : array-like of integers, shape (n_sequences, )
          Lengths of the individual sequences in ``X``. The sum of
          these should be ``n_samples``.
      """
      super()._init(X, lengths)
      random_state = check_random_state(self.random_state)
      if self._needs_init("e", "emissionprob_posterior_"):
          emissionprob_init = 1 / self.n_features
          if self.emissionprob_prior is not None:
              emissionprob_init = self.emissionprob_prior
          self.emissionprob_prior_ = np.full(
              (self.n_components, self.n_features), emissionprob_init
          )
          self.emissionprob_posterior_ = (
              random_state.dirichlet(
                  alpha=[emissionprob_init] * self.n_features,
                  size=self.n_components,
              )
              * sum(lengths)
              / self.n_components
          )
  
imports: import logging
  import numbers
  import numpy
  from scipy import special
  from sklearn import cluster
  from sklearn.utils import check_random_state
  from .None import _kl_divergence, _utils
  from ._emissions import BaseCategoricalHMM, BaseGaussianHMM
  from .base import VariationalBaseHMM
  from .hmm import COVARIANCE_TYPES
  from .utils import fill_covars
label_desc: Use image node_id 2 for calling the VariationalCategoricalHMM obj's underlying member method code with example usage: obj._init(X, lengths) without return types