diff options
| author | Arun Isaac | 2026-01-14 20:29:33 +0000 |
|---|---|---|
| committer | Arun Isaac | 2026-01-16 23:06:32 +0000 |
| commit | a76dedb432aa99f53681144c488ac19b9c23e660 (patch) | |
| tree | 17ba9a6502c0f71a4355f0b8210666b65749ea15 /tests/helpers/strategies.py | |
| parent | 1e6efe6ef73cbb65839a95883899442f5dc4afe1 (diff) | |
| download | pyhegp-a76dedb432aa99f53681144c488ac19b9c23e660.tar.gz pyhegp-a76dedb432aa99f53681144c488ac19b9c23e660.tar.lz pyhegp-a76dedb432aa99f53681144c488ac19b9c23e660.zip | |
Add intercept column in phenotypes file.
Diffstat (limited to 'tests/helpers/strategies.py')
| -rw-r--r-- | tests/helpers/strategies.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/helpers/strategies.py b/tests/helpers/strategies.py index 3771ed0..171c721 100644 --- a/tests/helpers/strategies.py +++ b/tests/helpers/strategies.py @@ -1,5 +1,5 @@ ### pyhegp --- Homomorphic encryption of genotypes and phenotypes -### Copyright © 2025 Arun Isaac <arunisaac@systemreboot.net> +### Copyright © 2025–2026 Arun Isaac <arunisaac@systemreboot.net> ### ### This file is part of pyhegp. ### @@ -104,13 +104,21 @@ phenotype_names = st.lists(tabless_printable_ascii_text @st.composite def phenotype_frames(draw, number_of_samples=st.integers(min_value=0, - max_value=10)): + max_value=10), + intercept_present=st.booleans()): _number_of_samples = draw(number_of_samples) return draw(data_frames( columns=([column(name="sample-id", dtype="str", elements=tabless_printable_ascii_text, unique=True)] + + ([column(name="intercept", + dtype="float64", + elements=st.floats(min_value=-1, + max_value=1, + allow_nan=False))] + if draw(intercept_present) + else []) + columns(draw(phenotype_names), dtype="float64", elements=st.floats(min_value=-1000, |
