#NEWLINE# def _predict_proba( self , X ) : #NEWLINE# #INDENT# x_midpoint = ( X . shape [ 2 ] // 2 ) #NEWLINE# y_midpoint = ( X . shape [ 1 ] // 2 ) #NEWLINE# x_lower_bound = ( x_midpoint - ( self . min_size [ 0 ] // 2 ) ) #NEWLINE# if ( x_lower_bound <= 0 ) : #NEWLINE# #INDENT# x_lower_bound = 0 #NEWLINE# #UNINDENT# x_upper_bound = ( x_lower_bound + self . min_size [ 0 ] ) #NEWLINE# y_lower_bound = ( y_midpoint - ( self . min_size [ 1 ] // 2 ) ) #NEWLINE# if ( y_lower_bound <= 0 ) : #NEWLINE# #INDENT# y_lower_bound = 0 #NEWLINE# #UNINDENT# y_upper_bound = ( y_midpoint + self . min_size [ 1 ] ) #NEWLINE# self . crop_bounds_ = ( x_lower_bound , x_upper_bound , y_lower_bound , y_upper_bound ) #NEWLINE# res = self . transform_function ( X [ : , y_lower_bound : y_upper_bound , x_lower_bound : x_upper_bound , : ] . transpose ( * self . transpose_order ) ) [ 0 ] #NEWLINE# exp_res = np . exp ( ( res - res . max ( axis = 1 ) ) ) #NEWLINE# exp_res /= np . sum ( exp_res , axis = 1 ) #NEWLINE# return exp_res