#NEWLINE# def negative_gradient( self , y , pred , **kargs ) : #NEWLINE# #INDENT# alpha = self . alpha #NEWLINE# pred = pred . ravel ( ) #NEWLINE# mask = ( y > pred ) #NEWLINE# return ( ( alpha * mask ) - ( ( 1.0 - alpha ) * ( ~ mask ) ) )