Em Algorithm, Statistics, Machine Learning, Clustering Algorithm, Python.
probability uniformly self.phi = np.full(self.n_clusters, 1/self.n_clusters) # mu # choose random initial points as mean value of each cluster initial_index = np.random.choice(n_sample, self.n_clusters) self.means = X[initial_index] # covariance # assign the whole data's covariance for the initial