SHARE
TWEET

Untitled

a guest Jul 11th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def L1_senstivity(query, n_entries = 1000):
  2.   db, pdbs = create_db_and_paralleldbs(n_entries)
  3.   maximum_distance = 0
  4.   total_result = query(db)
  5.   for pdb in pdbs:
  6.     current_result = query(pdb)
  7.     current_distance = torch.abs(current_result - total_result)
  8.     if(current_distance > maximum_distance):
  9.       maximum_distance = current_distance
  10.   return maximum_distance    
  11.  
  12. def mean_query(db):
  13.   return db.float().mean()
  14. def sum_query(db):
  15.   return db.sum()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top