'Incremental fit with X. All of X is processed as a single batch.
Parameters
X : array-like, shape (n_samples, n_features)
Training data, where n_samples is the number of samples and
n_features is the number of features.
check_input : bool
Run check_array on X.
Returns
self : object
Returns the instance itself.'

def partial_fit(self, X, y=None, check_input=True):

    if check_input:
        X = check_array(X, copy=self.copy, dtype=[np.float64, np.float32])
    (n_samples, n_features) = X.shape
    if (not hasattr(self, 'components_')):
        self.components_ = None
    if (self.n_components is None):
        self.n_components_ = n_features
    elif (not (1 <= self.n_components <= n_features)):
        raise ValueError(('n_components=%r    invalid    for    n_features=%d,    need    more    rows    than    columns    for    IncrementalPCA    processing' % (self.n_components, n_features)))
    else:
        self.n_components_ = self.n_components
    if ((self.components_ is not None) and (self.components_.shape[0] != self.n_components_)):
        raise ValueError(('Number    of    input    features    has    changed    from    %i    to    %i    between    calls    to    partial_fit!    Try    setting    n_components    to    a    fixed    value.' % (self.components_.shape[0], self.n_components_)))
    if (not hasattr(self, 'n_samples_seen_')):
        self.n_samples_seen_ = 0
        self.mean_ = 0.0
        self.var_ = 0.0
    (col_mean, col_var, n_total_samples) = _incremental_mean_and_var(X, last_mean=self.mean_, last_variance=self.var_, last_sample_count=self.n_samples_seen_)
    if (self.n_samples_seen_ == 0):
        X -= col_mean
    else:
        col_batch_mean = np.mean(X, axis=0)
        X -= col_batch_mean
        mean_correction = (np.sqrt(((self.n_samples_seen_ * n_samples) / n_total_samples)) * (self.mean_ - col_batch_mean))
        X = np.vstack(((self.singular_values_.reshape(((-1), 1)) * self.components_), X, mean_correction))
    (U, S, V) = linalg.svd(X, full_matrices=False)
    (U, V) = svd_flip(U, V, u_based_decision=False)
    explained_variance = ((S ** 2) / (n_total_samples - 1))
    explained_variance_ratio = ((S ** 2) / np.sum((col_var * n_total_samples)))
    self.n_samples_seen_ = n_total_samples
    self.components_ = V[:self.n_components_]
    self.singular_values_ = S[:self.n_components_]
    self.mean_ = col_mean
    self.var_ = col_var
    self.explained_variance_ = explained_variance[:self.n_components_]
    self.explained_variance_ratio_ = explained_variance_ratio[:self.n_components_]
    if (self.n_components_ < n_features):
        self.noise_variance_ = explained_variance[self.n_components_:].mean()
    else:
        self.noise_variance_ = 0.0
    return self
