Add Hypothesis Testing
See original GitHub issueIt may be beneficial to add hypothesis testing to some of our tests. Hypothesis testing allows for us to verify mathematical properties such as commutativity:
from hypothesis import given
import hypothesis.strategies as st
@given(st.integers(), st.integers())
def test_ints_are_commutative(x, y):
assert x + y == y + x
This allows the CI to look for edge cases for us. This would be useful testing metrics. https://hypothesis.readthedocs.io/en/latest/
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Hypothesis Testing - Statistics How To
Watch the video for a brief overview of hypothesis testing: Intro to Hypothesis Testing ... In Bayesian testing you add prior knowledge to...
Read more >Hypothesis Testing | A Step-by-Step Guide with Easy Examples
Hypothesis testing is a formal procedure for investigating our ideas about the world. It allows you to statistically test your predictions.
Read more >A Beginner's Guide to Hypothesis Testing in Business
To become more data-driven, you must learn how to validate your business hypotheses. Hypothesis testing is the key.
Read more >2.2 Hypothesis Testing
Hypothesis Testing. Practice Exercise 1: The null hypothesis states that there is. No Response A relationship between independent and dependent variables
Read more >Hypothesis Testing Steps & Real Life Examples - Data Analytics
Hypothesis testing techniques are often used in statistics and data science to analyze whether the claims about the occurrence of the events are ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Zac-HD Thank you for the link to the tutorial and your offer to help out! There are certainty a few interesting places for us to use property-based testing.
👋 hi all, I’m not much of an ML person but I am particularly interested in open source and in testing scientific code (as my tutorial at SciPy might indicate). So if getting a Hypothesis core dev to review or discuss some tests would ever be useful, ping me and let me know how I can help!
Along with - or before - testing all the mathematical properties you might think of, I highly recommend getting Hypothesis to generate any valid data (i.e. including unusual formats) and just calling your code. No assertions needed, in my experience you’ll find a bunch of crashes, quickly improve your input validation, and probably fix some bugs too. Once you have that experience, testing ‘metamorphic properties’ is ludicrously effective…