#NEWLINE# def _get_loss_function( self , loss ) : #NEWLINE# #INDENT# 'Get concrete ``LossFunction`` object for str ``loss``. ' #NEWLINE# try : #NEWLINE# #INDENT# loss_ = self . loss_functions [ loss ] #NEWLINE# ( loss_class , args ) = ( loss_ [ 0 ] , loss_ [ 1 : ] ) #NEWLINE# if ( loss in ( 'huber' , 'epsilon_insensitive' , 'squared_epsilon_insensitive' ) ) : #NEWLINE# #INDENT# args = ( self . epsilon , ) #NEWLINE# #UNINDENT# return loss_class ( * args ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ValueError ( ( 'The loss %s is not supported. ' % loss ) )