olpy/classifiers/__base.py
def partial_fit(self, X, Y, classes=None):
        """Trains the model on a single data point.

        Args:

            X (:obj:`numpy.ndarray`): Input data with n rows and
                m columns
            Y (:obj:`numpy.ndarray`): Output variable with binary
                labels.

            classes (:obj:`list` or `tuple`, optional): Represents the
                available labels in the dataset. Needs to be passed only
                once.
        
        Returns:
            self: the trained model.
        """
        self.labels = classes if classes else [0, 1]

        if self.weights is None:
            self._setup(X)
            self.weights = np.zeros(X.shape[1])

        for x, y in zip(X, Y):
            # Set the value to -1 
            if y != self.positive_label:
                y = -1
            self._update(x.squeeze(), y)
        return self
Trains the model on a single data point.

        Args:

            X (:obj:`numpy.ndarray`): Input data with n rows and
                m columns
            Y (:obj:`numpy.ndarray`): Output variable with binary
                labels.

            classes (:obj:`list` or `tuple`, optional): Represents the
                available labels in the dataset. Needs to be passed only
                once.
        
        Returns:
            self: the trained model.
        
Trains the model on a single data point.
Trains the model on a single data point .
def partial_fit(self, X, Y, classes=None):
        self.labels = classes if classes else [0, 1]
        if self.weights is None:
            self._setup(X)
            self.weights = np.zeros(X.shape[1])
        for x, y in zip(X, Y):
            if y != self.positive_label:
                y = -1
            self._update(x.squeeze(), y)
        return self
def partial_fit ( self , X , Y , classes = None ) : self . labels = classes if classes else [ 0 , 1 ] if self . weights is None : self . _setup ( X ) self . weights = np . zeros ( X . shape [ 1 ] ) for x , y in zip ( X , Y ) : if y != self . positive_label : y = - 1 self . _update ( x . squeeze ( ) , y ) return self
Trains the model on a single data point.
Trains the model on a single data point .
"""Trains the model on a single data point.

        Args:

            X (:obj:`numpy.ndarray`): Input data with n rows and
                m columns
            Y (:obj:`numpy.ndarray`): Output variable with binary
                labels.

            classes (:obj:`list` or `tuple`, optional): Represents the
                available labels in the dataset. Needs to be passed only
                once.
        
        Returns:
            self: the trained model.
        """ # Set the value to -1 
the trained model.
the trained model .
self
self
X
Y
classes
X (
`numpy.ndarray`): Input data with n rows and
m columns
` numpy . ndarray ` ) : Input data with n rows and m columns
Y (
`numpy.ndarray`): Output variable with binary
labels.
` numpy . ndarray ` ) : Output variable with binary labels .
classes (
`list` or `tuple`, optional): Represents the
available labels in the dataset. Needs to be passed only
once.
` list ` or ` tuple ` optional ) : Represents the available labels in the dataset . Needs to be passed only once .