class_docstr: A probabilistic clustering method for determining groupings among data samples.
  
  Parameters:
  -----------
  k: int
      The number of clusters the algorithm will form.
  max_iterations: int
      The number of iterations the algorithm will run for if it does
      not converge before that. 
  tolerance: float
      If the difference of the results from one iteration to the next is
      smaller than this value we will say that the algorithm has converged.
class_docstr_tok: ["A","probabilistic","clustering","method","for","determining","groupings","among","data","samples",".","Parameters",":","--","--","--","--","--","-","k",":","int","The","number","of","clusters","the","algorithm","will","form",".","max_iterations",":","int","The","number","of","iterations","the","algorithm","will","run","for","if","it","does","not","converge","before","that",".","tolerance",":","float","If","the","difference","of","the","results","from","one","iteration","to","the","next","is","smaller","than","this","value","we","will","say","that","the","algorithm","has","converged","."]
docstr: Update the parameters and priors 
docstr_tok: ["Update","the","parameters","and","priors"]
code: def _maximization(self, X):
      """Update the parameters and priors"""
      # Iterate through clusters and recalculate mean and covariance
      for i in range(self.k):
          resp = np.expand_dims(self.responsibility[:, i], axis=1)
          mean = (resp * X).sum(axis=0) / resp.sum()
          covariance = (X - mean).T.dot((X - mean) * resp) / resp.sum()
          self.parameters[i]["mean"], self.parameters[i]["cov"] = (
              mean,
              covariance,
          )
  
      # Update weights
      n_samples = np.shape(X)[0]
      self.priors = self.responsibility.sum(axis=0) / n_samples
  
file_path: ML-From-Scratch/mlfromscratch/unsupervised_learning/gaussian_mixture_model.py
imports: from __future__ import division, print_function
  import math
  from sklearn import datasets
  import numpy
  from mlfromscratch.utils import normalize, euclidean_distance, calculate_covariance_matrix
  from mlfromscratch.utils import Plot
label_desc: Use image node_id 6 for calling the GaussianMixtureModel obj's underlying member method code with example usage: obj._maximization(X) without return types