class_docstr: Gaussian Mixture Model
  
  Representation of a Gaussian mixture model probability distribution.
  This class allows for easy evaluation of, sampling from, and
  maximum-likelihood estimation of the parameters of a GMM distribution.
  
  Initializes parameters such that every mixture component has zero
  mean and identity covariance.
  
  Parameters
  ----------
  n_components : int, optional
      Number of mixture components. Defaults to 1.
  covariance_type : {'diag', 'spherical', 'tied', 'full'}
      String describing the type of covariance parameters to
      use. Defaults to 'diag'.
  
  Attributes
  ----------
  `weights_` : array, shape (n_components,)
      This attribute stores the mixing weights for each mixture component.
  `means_` : array, shape (n_components, n_features)
      Mean parameters for each mixture component.
  `covars_` : array
      Covariance parameters for each mixture component. The shape
      depends on `covariance_type`.::
  
      - (n_components, n_features)             if 'spherical',
      - (n_features, n_features)               if 'tied',
      - (n_components, n_features)             if 'diag',
      - (n_components, n_features, n_features) if 'full'.
  
  `converged_` : bool
      True when convergence was reached in fit(), False otherwise.
  
  See Also
  --------
  sklearn.mixture.GMM
class_docstr_tok: ["Gaussian","Mixture","Model","Representation","of","a","Gaussian","mixture","model","probability","distribution",".","This","class","allows","for","easy","evaluation","of",",","sampling","from",",","and","maximum-likelihood","estimation","of","the","parameters","of","a","GMM","distribution",".","Initializes","parameters","such","that","every","mixture","component","has","zero","mean","and","identity","covariance",".","Parameters","--","--","--","--","--","n_components",":","int",",","optional","Number","of","mixture","components",".","Defaults","to","1.","covariance_type",":","{","'diag","'",",","'spherical","'",",","'tied","'",",","'full","'","}","String","describing","the","type","of","covariance","parameters","to","use",".","Defaults","to","'diag","'",".","Attributes","--","--","--","--","--","`","weights_","`",":","array",",","shape","(","n_components",",",")","This","attribute","stores","the","mixing","weights","for","each","mixture","component",".","`","means_","`",":","array",",","shape","(","n_components",",","n_features",")","Mean","parameters","for","each","mixture","component",".","`","covars_","`",":","array","Covariance","parameters","for","each","mixture","component",".","The","shape","depends","on","`","covariance_type","`",".",":",":","-","(","n_components",",","n_features",")","if","'spherical","'",",","-","(","n_features",",","n_features",")","if","'tied","'",",","-","(","n_components",",","n_features",")","if","'diag","'",",","-","(","n_components",",","n_features",",","n_features",")","if","'full","'",".","`","converged_","`",":","bool","True","when","convergence","was","reached","in","fit","(",")",",","False","otherwise",".","See","Also","--","--","--","--","sklearn.mixture.GMM"]
code: def __setstate__(self, state):
      # TODO: old models have underscores at some variable names, thus rename
      #       them; remove this unpickling code after updating all models
      try:
          import warnings
  
          warnings.warn(
              "Please update your GMM models by loading them and "
              "saving them again. Loading old models will not "
              "work from version 0.16 onwards."
          )
          state["weights"] = state.pop("weights_")
          state["means"] = state.pop("means_")
          state["covars"] = state.pop("covars_")
      except KeyError:
          pass
      # restore pickled instance attributes
      self.__dict__.update(state)
  
file_path: madmom/madmom/ml/gmm.py
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from scipy import linalg
label_desc: Use image node_id 2 for calling the GMM obj's underlying member method code with example usage: obj.__setstate__(state) without return types