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 Calculates initial parameters for EM algorithm: means and covariances using
          specified strategy.
  
  @param[in] init_type (ema_init_type): Strategy for initialization.
  
  @return (float|list, float|numpy.array) Initial means and variance (covariance matrix in case multi-dimensional data).
docstr_tok: ["!","@","brief","Calculates","initial","parameters","for","EM","algorithm",":","means","and","covariances","using","specified","strategy",".","@","param","[","in","]","init_type","(","ema_init_type",")",":","Strategy","for","initialization",".","@","return","(","float|list",",","float|numpy.array",")","Initial","means","and","variance","(","covariance","matrix","in","case","multi-dimensional","data",")","."]
code: def initialize(self, init_type=ema_init_type.KMEANS_INITIALIZATION):
      """!
      @brief Calculates initial parameters for EM algorithm: means and covariances using
              specified strategy.
  
      @param[in] init_type (ema_init_type): Strategy for initialization.
  
      @return (float|list, float|numpy.array) Initial means and variance (covariance matrix in case multi-dimensional data).
  
      """
      if init_type == ema_init_type.KMEANS_INITIALIZATION:
          return self.__initialize_kmeans()
  
      elif init_type == ema_init_type.RANDOM_INITIALIZATION:
          return self.__initialize_random()
  
      raise NameError(
          "Unknown type of EM algorithm initialization is specified."
      )
  
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 2 for calling the ema_initializer obj's underlying member method code with example usage: obj.initialize(init_type) and returns: self, self