#NEWLINE# def pseudoResidualsAndRegressionValues( self , previousRegressionValues = None ) : #NEWLINE# #INDENT# if ( previousRegressionValues is None ) : #NEWLINE# #INDENT# regressionValues = self . additiveRegressionTree . predict ( regressionValues . X ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# regressionValues = ( previousRegressionValues + self . additiveRegressionTree . getTree ( ( - 1 ) ) . predict ( self . X ) ) #NEWLINE# #UNINDENT# return ( self . loss . negativeGradient ( self . yAsSeries , regressionValues , self . classes ) , regressionValues )