'Online computation of mean and std on X for later scaling.
All of X is processed as a single batch. This is intended for cases
when `fit` is not feasible due to very large number of `n_samples`
or because X is read from a continuous stream.
The algorithm for incremental mean and std is given in Equation 1.5a,b
in Chan, Tony F., Gene H. Golub, and Randall J. LeVeque. "Algorithms
for computing the sample variance: Analysis and recommendations."
The American Statistician 37.3 (1983): 242-247:
Parameters
X : {array-like, sparse matrix}, shape [n_samples, n_features]
The data used to compute the mean and standard deviation
used for later scaling along the features axis.
y : Passthrough for ``Pipeline`` compatibility.'

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

    X = check_array(X, accept_sparse=('csr', 'csc'), copy=self.copy, warn_on_dtype=True, estimator=self, dtype=FLOAT_DTYPES)
    if sparse.issparse(X):
        if self.with_mean:
            raise ValueError('Cannot    center    sparse    matrices:    pass    `with_mean=False`    instead.    See    docstring    for    motivation    and    alternatives.')
        if self.with_std:
            if (not hasattr(self, 'n_samples_seen_')):
                (self.mean_, self.var_) = mean_variance_axis(X, axis=0)
                self.n_samples_seen_ = X.shape[0]
            else:
                (self.mean_, self.var_, self.n_samples_seen_) = incr_mean_variance_axis(X, axis=0, last_mean=self.mean_, last_var=self.var_, last_n=self.n_samples_seen_)
        else:
            self.mean_ = None
            self.var_ = None
    else:
        if (not hasattr(self, 'n_samples_seen_')):
            self.mean_ = 0.0
            self.n_samples_seen_ = 0
            if self.with_std:
                self.var_ = 0.0
            else:
                self.var_ = None
        (self.mean_, self.var_, self.n_samples_seen_) = _incremental_mean_and_var(X, self.mean_, self.var_, self.n_samples_seen_)
    if self.with_std:
        self.scale_ = _handle_zeros_in_scale(np.sqrt(self.var_))
    else:
        self.scale_ = None
    return self
