(self, X, y, sample_weight=None)
return super(RandomizedLogisticRegression, self).fit(X_rescaled, y, sample_weight)
Fit the model according to the given training data.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            The training input samples.

        y : array-like, shape = [n_samples]
            The target values.

        sample_weight : array-like, shape (n_samples,) optional
            Array of weights that are assigned to individual samples.
            If not provided, then each sample is given unit weight.
Fit the model according to the given training data.
Fit the model according to the given training data .
def fit(self, X, y, sample_weight=None):
        """Fit the model according to the given training data.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            The training input samples.

        y : array-like, shape = [n_samples]
            The target values.

        sample_weight : array-like, shape (n_samples,) optional
            Array of weights that are assigned to individual samples.
            If not provided, then each sample is given unit weight.
        """
        if not isinstance(self.weakness, float) or not (0.0 < self.weakness <= 1.0):
            raise ValueError('weakness should be a float in (0, 1], got %s' % self.weakness)

        X, y = check_X_y(X, y, accept_sparse='csr', dtype=[np.float64, np.float32],
                         order="C")

        n_features = X.shape[1]
        weakness = 1. - self.weakness
        random_state = check_random_state(self.random_state)

        weights = weakness * random_state.randint(0, 1 + 1, size=(n_features,))
        X_rescaled = _rescale_data(X, weights)
        return super(RandomizedLogisticRegression, self).fit(X_rescaled, y, sample_weight)
def fit ( self , X , y , sample_weight = None ) : if not isinstance ( self . weakness , float ) or not ( 0.0 < self . weakness <= 1.0 ) : raise ValueError ( 'weakness should be a float in (0, 1], got %s' % self . weakness ) X , y = check_X_y ( X , y , accept_sparse = 'csr' , dtype = [ np . float64 , np . float32 ] , order = "C" ) n_features = X . shape [ 1 ] weakness = 1. - self . weakness random_state = check_random_state ( self . random_state ) weights = weakness * random_state . randint ( 0 , 1 + 1 , size = ( n_features , ) ) X_rescaled = _rescale_data ( X , weights ) return super ( RandomizedLogisticRegression , self ) . fit ( X_rescaled , y , sample_weight )