parameters: (self,
                 data,
                 num_classes,
                 initial_means=None,
                 params='wmc',
                 covariance_type=FULL_COVARIANCE,
                 random_seed=0)
docstring: Constructor.
  
      Args:
        data: a list of Tensors with data, each row is a new example.
        num_classes: number of clusters.
        initial_means: a Tensor with a matrix of means. If None, means are
          computed by sampling randomly.
        params: Controls which parameters are updated in the training
          process. Can contain any combination of "w" for weights, "m" for
          means, and "c" for covariances.
        covariance_type: one of "full", "diag".
        random_seed: Seed for PRNG used to initialize seeds.
  
      Raises:
        Exception if covariance type is unknown.
docstring_summary: Constructor.
docstring_tokens: Constructor .
function: def __init__(self,
                 data,
                 num_classes,
                 initial_means=None,
                 params='wmc',
                 covariance_type=FULL_COVARIANCE,
                 random_seed=0):
      """Constructor.
  
      Args:
        data: a list of Tensors with data, each row is a new example.
        num_classes: number of clusters.
        initial_means: a Tensor with a matrix of means. If None, means are
          computed by sampling randomly.
        params: Controls which parameters are updated in the training
          process. Can contain any combination of "w" for weights, "m" for
          means, and "c" for covariances.
        covariance_type: one of "full", "diag".
        random_seed: Seed for PRNG used to initialize seeds.
  
      Raises:
        Exception if covariance type is unknown.
      """
      self._params = params
      self._random_seed = random_seed
      self._covariance_type = covariance_type
      if self._covariance_type not in [DIAG_COVARIANCE, FULL_COVARIANCE]:
        raise Exception(  # pylint: disable=g-doc-exception
            'programmer error: Invalid covariance type: %s' %
            self._covariance_type)
      # Create sharded variables for multiple shards. The following
      # lists are indexed by shard.
      # Probability per example in a class.
      num_shards = len(data)
      self._probs = [None] * num_shards
      # Prior probability.
      self._prior_probs = [None] * num_shards
      # Membership weights w_{ik} where "i" is the i-th example and "k"
      # is the k-th mixture.
      self._w = [None] * num_shards
      # Number of examples in a class.
      self._points_in_k = [None] * num_shards
      first_shard = data[0]
      self._dimensions = array_ops.shape(first_shard)[1]
      self._num_classes = num_classes
      # Small value to guarantee that covariances are invertible.
      self._min_var = array_ops.diag(
          array_ops.ones(array_ops.stack([self._dimensions]))) * 1e-3
      self._create_variables()
      self._initialize_variables(data, initial_means)
      # Operations of partial statistics for the computation of the means.
      self._w_mul_x = []
      # Operations of partial statistics for the computation of the covariances.
      self._w_mul_x2 = []
      self._define_graph(data)
function_tokens: def __init__ ( self , data , num_classes , initial_means = None , params = 'wmc' , covariance_type = FULL_COVARIANCE , random_seed = 0 ) : self . _params = params self . _random_seed = random_seed self . _covariance_type = covariance_type if self . _covariance_type not in [ DIAG_COVARIANCE , FULL_COVARIANCE ] : raise Exception ( # pylint: disable=g-doc-exception 'programmer error: Invalid covariance type: %s' % self . _covariance_type ) # Create sharded variables for multiple shards. The following # lists are indexed by shard. # Probability per example in a class. num_shards = len ( data ) self . _probs = [ None ] * num_shards # Prior probability. self . _prior_probs = [ None ] * num_shards # Membership weights w_{ik} where "i" is the i-th example and "k" # is the k-th mixture. self . _w = [ None ] * num_shards # Number of examples in a class. self . _points_in_k = [ None ] * num_shards first_shard = data [ 0 ] self . _dimensions = array_ops . shape ( first_shard ) [ 1 ] self . _num_classes = num_classes # Small value to guarantee that covariances are invertible. self . _min_var = array_ops . diag ( array_ops . ones ( array_ops . stack ( [ self . _dimensions ] ) ) ) * 1e-3 self . _create_variables ( ) self . _initialize_variables ( data , initial_means ) # Operations of partial statistics for the computation of the means. self . _w_mul_x = [ ] # Operations of partial statistics for the computation of the covariances. self . _w_mul_x2 = [ ] self . _define_graph ( data )