def remove_clusters(self, indices): """Remove clusters with insufficient support. """ keep_indices = ind_retain_elements(indices, self.num_comp) self.num_comp = self.num_comp - len(indices) self.smm_mean = self.smm_mean[keep_indices] self.smm_covar = self.smm_covar[keep_indices, :, :] self.smm_mixweights = self.smm_mixweights[keep_indices]
def remove_clusters(self, indices): """Remove clusters with insufficient support. """ keep_indices = ind_retain_elements(indices, self.num_comp) self.num_comp = self.num_comp - len(indices) self.dirichlet = self.dirichlet[keep_indices] self.nws_scale = self.nws_scale[keep_indices] self.nws_dof = self.nws_dof[keep_indices] self.nws_mean = self.nws_mean[keep_indices, :] self.smm_dof = self.smm_dof[keep_indices] self.nws_scale_matrix = self.nws_scale_matrix[keep_indices, :, :] self.nws_scale_matrix_inv = \ self.nws_scale_matrix_inv[keep_indices, :, :]
def remove_clusters(self, indices): """Remove clusters with insufficient support. """ keep_indices = ind_retain_elements(indices, self.num_comp) self.num_comp = self.num_comp - len(indices) self.latent_resp = self.latent_resp[:, keep_indices] self.latent_scale = self.latent_scale[:, keep_indices] self.latent_log_scale = self.latent_log_scale[:, keep_indices] self.latent_scaled_resp = self.latent_scaled_resp[:, keep_indices] self.log_smm_mixweight = self.log_smm_mixweight[keep_indices] self.log_det_precision = self.log_det_precision[keep_indices] self.gamma_param_alpha = self.gamma_param_alpha[keep_indices] self.gamma_param_beta = self.gamma_param_beta[:, keep_indices]