#NEWLINE# def _fit_regression( self , y ) : #NEWLINE# #INDENT# '\n        fit regression using pseudo-inverse\n        or supplied regressor\n        ' #NEWLINE# if ( self . regressor is None ) : #NEWLINE# #INDENT# self . coefs_ = safe_sparse_dot ( pinv2 ( self . hidden_activations_ ) , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . regressor . fit ( self . hidden_activations_ , y ) #NEWLINE# #UNINDENT# self . fitted_ = True