#NEWLINE# def main( ) : #NEWLINE# #INDENT# data = json . load ( open ( '../models/training_data_0.json' ) ) #NEWLINE# data = data [ 'neg' ] #NEWLINE# images = [ ex ( data [ i ] ) for i in [ 40 , 41 , ( - 3 ) , ( - 1 ) ] ] #NEWLINE# dx = images [ 0 ] . shape [ 0 ] #NEWLINE# images = np . hstack ( ( np . vstack ( images [ i : ( i + 2 ) ] ) for i in [ 0 , 2 ] ) ) #NEWLINE# plt . imshow ( images ) #NEWLINE# kw = { #NEWLINE# #INDENT# 'color' : 'w' , #NEWLINE# 'lw' : 4 , #NEWLINE# #UNINDENT# } #NEWLINE# plt . axhline ( dx , ** kw ) #NEWLINE# plt . axvline ( dx , ** kw ) #NEWLINE# kw = { #NEWLINE# #INDENT# 'ha' : 'center' , #NEWLINE# 'va' : 'bottom' , #NEWLINE# 'fontsize' : 14 , #NEWLINE# #UNINDENT# } #NEWLINE# plt . annotate ( 'Random' , xy = ( ( dx / 2 ) , ( ( 2 * dx ) - 40 ) ) , color = 'white' , ** kw ) #NEWLINE# plt . annotate ( 'Random' , xy = ( ( dx / 2 ) , ( dx - 40 ) ) , color = 'white' , ** kw ) #NEWLINE# plt . annotate ( 'Hard' , xy = ( ( ( 3 * dx ) / 2 ) , ( ( 2 * dx ) - 40 ) ) , color = 'k' , ** kw ) #NEWLINE# plt . annotate ( 'Hard' , xy = ( ( ( 3 * dx ) / 2 ) , ( dx - 40 ) ) , color = 'k' , ** kw ) #NEWLINE# plt . title ( 'Negative Training Examples' ) #NEWLINE# hide_axes ( ) #NEWLINE# plt . savefig ( 'bootstrap_neg.eps' )