'Fit linear model with Passive Aggressive algorithm.
Parameters
X : {array-like, sparse matrix}, shape = [n_samples, n_features]
Subset of the training data
y : numpy array of shape [n_samples]
Subset of the target values
classes : array, shape = [n_classes]
Classes across all calls to partial_fit.
Can be obtained by via `np.unique(y_all)`, where y_all is the
target vector of the entire dataset.
This argument is required for the first call to partial_fit
and can be omitted in the subsequent calls.
Note that y doesn\'t need to contain all labels in `classes`.
Returns
self : returns an instance of self.'

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

    if (self.class_weight == 'balanced'):
        raise ValueError("class_weight    'balanced'    is    not    supported    for    partial_fit.    For    'balanced'    weights,    use    `sklearn.utils.compute_class_weight`    with    `class_weight='balanced'`.    In    place    of    y    you    can    use    a    large    enough    subset    of    the    full    training    set    target    to    properly    estimate    the    class    frequency    distributions.    Pass    the    resulting    weights    as    the    class_weight    parameter.")
    lr = ('pa1' if (self.loss == 'hinge') else 'pa2')
    return self._partial_fit(X, y, alpha=1.0, C=self.C, loss='hinge', learning_rate=lr, max_iter=1, classes=classes, sample_weight=None, coef_init=None, intercept_init=None)
