'Compute the log-likelihood of each sample
Parameters
X : array, shape (n_samples, n_features)
The data
Returns
ll : array, shape (n_samples,)
Log-likelihood of each sample under the current model'

def score_samples(self, X):

    check_is_fitted(self, 'components_')
    Xr = (X - self.mean_)
    precision = self.get_precision()
    n_features = X.shape[1]
    log_like = np.zeros(X.shape[0])
    log_like = ((-0.5) * (Xr * np.dot(Xr, precision)).sum(axis=1))
    log_like -= (0.5 * ((n_features * log((2.0 * np.pi))) - fast_logdet(precision)))
    return log_like
