#NEWLINE# def show_errors( cross_entropy_errors_by_fold , method = 'cross entropy' , lower_is_better = True ) : #NEWLINE# #INDENT# print ( ( ( 'Cross validation %s errors:' % method ) + str ( cross_entropy_errors_by_fold ) ) ) #NEWLINE# if lower_is_better : #NEWLINE# #INDENT# note = '(lower is better)' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# note = '(higher is better)' #NEWLINE# #UNINDENT# print ( ( '%s %s: %0.2f (+/- %0.2f)' % ( method , note , cross_entropy_errors_by_fold . mean ( ) , ( cross_entropy_errors_by_fold . std ( ) / 2 ) ) ) )