'Fit the model by computing full SVD on X'

def _fit_full(self, X, n_components):

    (n_samples, n_features) = X.shape
    if (n_components == 'mle'):
        if (n_samples < n_features):
            raise ValueError("n_components='mle'    is    only    supported    if    n_samples    >=    n_features")
    elif (not (0 <= n_components <= n_features)):
        raise ValueError(("n_components=%r    must    be    between    0    and    n_features=%r    with    svd_solver='full'" % (n_components, n_features)))
    self.mean_ = np.mean(X, axis=0)
    X -= self.mean_
    (U, S, V) = linalg.svd(X, full_matrices=False)
    (U, V) = svd_flip(U, V)
    components_ = V
    explained_variance_ = ((S ** 2) / (n_samples - 1))
    total_var = explained_variance_.sum()
    explained_variance_ratio_ = (explained_variance_ / total_var)
    singular_values_ = S.copy()
    if (n_components == 'mle'):
        n_components = _infer_dimension_(explained_variance_, n_samples, n_features)
    elif (0 < n_components < 1.0):
        ratio_cumsum = stable_cumsum(explained_variance_ratio_)
        n_components = (np.searchsorted(ratio_cumsum, n_components) + 1)
    if (n_components < min(n_features, n_samples)):
        self.noise_variance_ = explained_variance_[n_components:].mean()
    else:
        self.noise_variance_ = 0.0
    (self.n_samples_, self.n_features_) = (n_samples, n_features)
    self.components_ = components_[:n_components]
    self.n_components_ = n_components
    self.explained_variance_ = explained_variance_[:n_components]
    self.explained_variance_ratio_ = explained_variance_ratio_[:n_components]
    self.singular_values_ = singular_values_[:n_components]
    return (U, S, V)
