'Check that the parameters are well defined.
Parameters
X : array-like, shape (n_samples, n_features)'

def _check_parameters(self, X):

    if (self.covariance_type not in ['spherical', 'tied', 'diag', 'full']):
        raise ValueError(("Invalid    value    for    'covariance_type':    %s    'covariance_type'    should    be    in    ['spherical',    'tied',    'diag',    'full']" % self.covariance_type))
    if (self.weight_concentration_prior_type not in ['dirichlet_process', 'dirichlet_distribution']):
        raise ValueError(("Invalid    value    for    'weight_concentration_prior_type':    %s    'weight_concentration_prior_type'    should    be    in    ['dirichlet_process',    'dirichlet_distribution']" % self.weight_concentration_prior_type))
    self._check_weights_parameters()
    self._check_means_parameters(X)
    self._check_precision_parameters(X)
    self._checkcovariance_prior_parameter(X)
