Advertisement
Guest User

hamo_evaluate

a guest
Feb 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. '''
  2.    Parameter
  3.        output_from_simulation: output from simulation (numpy array or python list)
  4.                                shape(2,n), first row is reduced fail search
  5.                                            second row is fail exist search
  6.    Output
  7.        fail_red : reduced fail percentage
  8.        profit    : profit in Baht (can be negative)
  9. '''
  10. def evaluate(output_from_simulation):
  11.    
  12.     failed = np.array(output_from_simulation)
  13.     failed_sum = np.sum(p,axis=1)
  14.    
  15.     fail_red = failed_sum[0] / (failed_sum[0] + failed_sum[1])
  16.    
  17.     #numbers from statistic
  18.     profit = (0.8*25.4226*failed_sum[0])*0.2533 - 10/3*2
  19.    
  20.     return fail_red, profit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement