#NEWLINE# def update( self , j , est ) : #NEWLINE# #INDENT# 'Update reporter with new iteration. ' #NEWLINE# do_oob = ( est . subsample < 1 ) #NEWLINE# i = ( j - self . begin_at_stage ) #NEWLINE# if ( ( ( i + 1 ) % self . verbose_mod ) == 0 ) : #NEWLINE# #INDENT# oob_impr = ( est . oob_improvement_ [ j ] if do_oob else 0 ) #NEWLINE# remaining_time = ( ( ( est . n_estimators - ( j + 1 ) ) * ( time ( ) - self . start_time ) ) / float ( ( i + 1 ) ) ) #NEWLINE# if ( remaining_time > 60 ) : #NEWLINE# #INDENT# remaining_time = '{0:.2f}m' . format ( ( remaining_time / 60.0 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# remaining_time = '{0:.2f}s' . format ( remaining_time ) #NEWLINE# #UNINDENT# print ( self . verbose_fmt . format ( iter = ( j + 1 ) , train_score = est . train_score_ [ j ] , oob_impr = oob_impr , remaining_time = remaining_time ) ) #NEWLINE# if ( ( self . verbose == 1 ) and ( ( ( i + 1 ) // ( self . verbose_mod * 10 ) ) > 0 ) ) : #NEWLINE# #INDENT# self . verbose_mod *= 10