Skip to content

Instantly share code, notes, and snippets.

@Tandon-A
Created September 9, 2019 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tandon-A/685978858f9423c54128fda620706a1a to your computer and use it in GitHub Desktop.
Save Tandon-A/685978858f9423c54128fda620706a1a to your computer and use it in GitHub Desktop.
def analysis(db_size,query,noise_percentage=0.5):
db = create_db(db_size)
augmented_db = modify_db(db,noise_percentage)
true_output = query(db)
augmented_output = query(augmented_db)
analysis_output = (augmented_output - (1 - noise_percentage) * 0.5)/noise
print ("size = %r orginal_db result = %r augmented_db result = %r deskewed analysis result = %r" %(db_size,true_output,augmented_output,analysis_output))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment