'Updates the model using the data in X as a mini-batch.
Parameters
X : array-like, shape (n_samples, n_features)
Training vector, where n_samples in the number of samples
and n_features is the number of features.
iter_offset : integer, optional
The number of iteration on data batches that has been
performed before this call to partial_fit. This is optional:
if no number is passed, the memory of the object is
used.
Returns
self : object
Returns the instance itself.'

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

    if (not hasattr(self, 'random_state_')):
        self.random_state_ = check_random_state(self.random_state)
    X = check_array(X)
    if hasattr(self, 'components_'):
        dict_init = self.components_
    else:
        dict_init = self.dict_init
    inner_stats = getattr(self, 'inner_stats_', None)
    if (iter_offset is None):
        iter_offset = getattr(self, 'iter_offset_', 0)
    (U, (A, B)) = dict_learning_online(X, self.n_components, self.alpha, n_iter=self.n_iter, method=self.fit_algorithm, n_jobs=self.n_jobs, dict_init=dict_init, batch_size=len(X), shuffle=False, verbose=self.verbose, return_code=False, iter_offset=iter_offset, random_state=self.random_state_, return_inner_stats=True, inner_stats=inner_stats)
    self.components_ = U
    self.inner_stats_ = (A, B)
    self.iter_offset_ = (iter_offset + self.n_iter)
    return self
