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: Parameters
  ----------
  n_components : int
      Number of states.
  
  startprob_prior : array, shape (n_components, ), optional
      Parameters of the Dirichlet prior distribution for
      :attr:`startprob_`.
  
  transmat_prior : array, shape (n_components, n_components), optional
      Parameters of the Dirichlet prior distribution for each row
      of the transition probabilities :attr:`transmat_`.
  
  emissionprob_prior : array, shape (n_components, n_features), optional
      Parameters of the Dirichlet prior distribution for
      :attr:`emissionprob_`.
  
  n_features: int, optional
      The number of categorical symbols in the HMM.  Will be inferred
      from the data if not set.
  
  algorithm : {"viterbi", "map"}, optional
      Decoder algorithm.
  
      - "viterbi": finds the most likely sequence of states, given all
        emissions.
      - "map" (also known as smoothing or forward-backward): finds the
        sequence of the individual most-likely states, given all
        emissions.
  
  random_state: RandomState or an int seed, optional
      A random number generator instance.
  
  n_iter : int, optional
      Maximum number of iterations to perform.
  
  tol : float, optional
      Convergence threshold. EM will stop if the gain in log-likelihood
      is below this value.
  
  verbose : bool, optional
      Whether per-iteration convergence reports are printed to
      :data:`sys.stderr`.  Convergence can also be diagnosed using the
      :attr:`monitor_` attribute.
  
  params, init_params : string, optional
      The parameters that get updated during (``params``) or initialized
      before (``init_params``) the training.  Can contain any
      combination of 's' for startprob, 't' for transmat, and 'e' for
      emissionprob.  Defaults to all parameters.
  
  implementation : string, optional
      Determines if the forward-backward algorithm is implemented with
      logarithms ("log"), or using scaling ("scaling").  The default is
      to use logarithms for backwards compatability.
docstr_tok: ["Parameters","--","--","--","--","--","n_components",":","int","Number","of","states",".","startprob_prior",":","array",",","shape","(","n_components",",",")",",","optional","Parameters","of","the","Dirichlet","prior","distribution","for",":","attr",":","`","startprob_","`",".","transmat_prior",":","array",",","shape","(","n_components",",","n_components",")",",","optional","Parameters","of","the","Dirichlet","prior","distribution","for","each","row","of","the","transition","probabilities",":","attr",":","`","transmat_","`",".","emissionprob_prior",":","array",",","shape","(","n_components",",","n_features",")",",","optional","Parameters","of","the","Dirichlet","prior","distribution","for",":","attr",":","`","emissionprob_","`",".","n_features",":","int",",","optional","The","number","of","categorical","symbols","in","the","HMM",".","Will","be","inferred","from","the","data","if","not","set",".","algorithm",":","{","``","viterbi","''",",","``","map","''","}",",","optional","Decoder","algorithm",".","-","``","viterbi","''",":","finds","the","most","likely","sequence","of","states",",","given","all","emissions",".","-","``","map","''","(","also","known","as","smoothing","or","forward-backward",")",":","finds","the","sequence","of","the","individual","most-likely","states",",","given","all","emissions",".","random_state",":","RandomState","or","an","int","seed",",","optional","A","random","number","generator","instance",".","n_iter",":","int",",","optional","Maximum","number","of","iterations","to","perform",".","tol",":","float",",","optional","Convergence","threshold",".","EM","will","stop","if","the","gain","in","log-likelihood","is","below","this","value",".","verbose",":","bool",",","optional","Whether","per-iteration","convergence","reports","are","printed","to",":","data",":","`","sys.stderr","`",".","Convergence","can","also","be","diagnosed","using","the",":","attr",":","`","monitor_","`","attribute",".","params",",","init_params",":","string",",","optional","The","parameters","that","get","updated","during","(","``","params","``",")","or","initialized","before","(","``","init_params","``",")","the","training",".","Can","contain","any","combination","of","'s","'","for","startprob",",","'t","'","for","transmat",",","and","'","e","'","for","emissionprob",".","Defaults","to","all","parameters",".","implementation",":","string",",","optional","Determines","if","the","forward-backward","algorithm","is","implemented","with","logarithms","(","``","log","''",")",",","or","using","scaling","(","``","scaling","''",")",".","The","default","is","to","use","logarithms","for","backwards","compatability","."]
code: def __init__(
      self,
      n_components=1,
      startprob_prior=None,
      transmat_prior=None,
      emissionprob_prior=None,
      n_features=None,
      algorithm="viterbi",
      random_state=None,
      n_iter=100,
      tol=1e-6,
      verbose=False,
      params="ste",
      init_params="ste",
      implementation="log",
  ):
      """
      Parameters
      ----------
      n_components : int
          Number of states.
  
      startprob_prior : array, shape (n_components, ), optional
          Parameters of the Dirichlet prior distribution for
          :attr:`startprob_`.
  
      transmat_prior : array, shape (n_components, n_components), optional
          Parameters of the Dirichlet prior distribution for each row
          of the transition probabilities :attr:`transmat_`.
  
      emissionprob_prior : array, shape (n_components, n_features), optional
          Parameters of the Dirichlet prior distribution for
          :attr:`emissionprob_`.
  
      n_features: int, optional
          The number of categorical symbols in the HMM.  Will be inferred
          from the data if not set.
  
      algorithm : {"viterbi", "map"}, optional
          Decoder algorithm.
  
          - "viterbi": finds the most likely sequence of states, given all
            emissions.
          - "map" (also known as smoothing or forward-backward): finds the
            sequence of the individual most-likely states, given all
            emissions.
  
      random_state: RandomState or an int seed, optional
          A random number generator instance.
  
      n_iter : int, optional
          Maximum number of iterations to perform.
  
      tol : float, optional
          Convergence threshold. EM will stop if the gain in log-likelihood
          is below this value.
  
      verbose : bool, optional
          Whether per-iteration convergence reports are printed to
          :data:`sys.stderr`.  Convergence can also be diagnosed using the
          :attr:`monitor_` attribute.
  
      params, init_params : string, optional
          The parameters that get updated during (``params``) or initialized
          before (``init_params``) the training.  Can contain any
          combination of 's' for startprob, 't' for transmat, and 'e' for
          emissionprob.  Defaults to all parameters.
  
      implementation : string, optional
          Determines if the forward-backward algorithm is implemented with
          logarithms ("log"), or using scaling ("scaling").  The default is
          to use logarithms for backwards compatability.
      """
      super().__init__(
          n_components=n_components,
          startprob_prior=startprob_prior,
          transmat_prior=transmat_prior,
          algorithm=algorithm,
          random_state=random_state,
          n_iter=n_iter,
          tol=tol,
          verbose=verbose,
          params=params,
          init_params=init_params,
          implementation=implementation,
      )
      self.emissionprob_prior = emissionprob_prior
      self.n_features = n_features
  
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 1 to create a new VariationalCategoricalHMM object from inherited base classes: BaseCategoricalHMM, VariationalBaseHMM with example: obj = VariationalCategoricalHMM(n_components, startprob_prior, transmat_prior, emissionprob_prior, n_features, algorithm, random_state, n_iter, tol, verbose, params, init_params, implementation)