class_docstr: !
  @brief Provides services for preparing initial means and covariances for Expectation-Maximization algorithm.
  @details Initialization strategy is defined by enumerator 'ema_init_type': random initialization and 
            kmeans with kmeans++ initialization. Here an example of initialization using kmeans strategy:
  
  @code
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import FAMOUS_SAMPLES
      from pyclustering.cluster.ema import ema_initializer
  
      sample = read_sample(FAMOUS_SAMPLES.SAMPLE_OLD_FAITHFUL)
      amount_clusters = 2
  
      initial_means, initial_covariance = ema_initializer(sample, amount_clusters).initialize()
      print(initial_means)
      print(initial_covariance)
  @endcode
docstr: !
  @brief Constructs EM initializer.
  
  @param[in] sample (list): Data that will be used by the EM algorithm.
  @param[in] amount (uint): Amount of clusters that should be allocated by the EM algorithm.
docstr_tok: ["!","@","brief","Constructs","EM","initializer",".","@","param","[","in","]","sample","(","list",")",":","Data","that","will","be","used","by","the","EM","algorithm",".","@","param","[","in","]","amount","(","uint",")",":","Amount","of","clusters","that","should","be","allocated","by","the","EM","algorithm","."]
code: def __init__(self, sample, amount):
      """!
      @brief Constructs EM initializer.
  
      @param[in] sample (list): Data that will be used by the EM algorithm.
      @param[in] amount (uint): Amount of clusters that should be allocated by the EM algorithm.
  
      """
      self.__sample = sample
      self.__amount = amount
  
imports: import numpy
  import random
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  from pyclustering.cluster.kmeans import kmeans
  from pyclustering.utils import pi, calculate_ellipse_description, euclidean_distance_square
  from enum import IntEnum
  import matplotlib.pyplot
  import matplotlib.animation
  from matplotlib import patches
label_desc: Use image node_id 1 to create a new ema_initializer object  with example: obj = ema_initializer(sample, amount)