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: Validate model parameters prior to fitting.
  
  Raises
  ------
  ValueError
      If any of the parameters are invalid, e.g. if :attr:`startprob_`
      don't sum to 1.
docstr_tok: ["Validate","model","parameters","prior","to","fitting",".","Raises","--","--","--","ValueError","If","any","of","the","parameters","are","invalid",",","e.g",".","if",":","attr",":","`","startprob_","`","do","n't","sum","to","1","."]
code: def _check(self):
      """
      Validate model parameters prior to fitting.
  
      Raises
      ------
      ValueError
          If any of the parameters are invalid, e.g. if :attr:`startprob_`
          don't sum to 1.
      """
      super()._check()
  
      self.emissionprob_prior_ = np.atleast_2d(self.emissionprob_prior_)
      self.emissionprob_posterior_ = np.atleast_2d(
          self.emissionprob_posterior_
      )
  
      if (
          self.emissionprob_prior_.shape
          != self.emissionprob_posterior_.shape
      ):
          raise ValueError(
              "emissionprob_prior_ and emissionprob_posterior_must"
              "have shape (n_components, n_features)"
          )
      if self.n_features is None:
          self.n_features = self.emissionprob_posterior_.shape[1]
      if self.emissionprob_posterior_.shape != (
          self.n_components,
          self.n_features,
      ):
          raise ValueError(
              f"emissionprob_ must have shape"
              f"({self.n_components}, {self.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 4 for calling the VariationalCategoricalHMM obj's underlying member method code with example usage: obj._check() without return types