#NEWLINE# def fit( self , X , y , init_weights = True ) : #NEWLINE# #INDENT# 'Learn weight coefficients from training data.\n\n        Parameters\n        ----------\n        X : {array-like, sparse matrix}, shape = [n_samples, n_features]\n            Training vectors, where n_samples is the number of samples and\n            n_features is the number of features.\n        y : array-like, shape = [n_samples]\n            Target values.\n        init_weights : bool (default: None)\n            Reinitialize weights\n\n        Returns\n        -------\n        self : object\n\n        ' #NEWLINE# if ( not ( ( init_weights is None ) or isinstance ( init_weights , bool ) ) ) : #NEWLINE# #INDENT# raise AttributeError ( 'init_weights must be True, False, or None' ) #NEWLINE# #UNINDENT# init_weights #NEWLINE# self . _check_arrays ( X = X , y = y ) #NEWLINE# return self