Open austinTalbot7241993 opened 3 days ago
The changes introduce a new parameter, assess_model_assumptions
, to the constructors of two classes in the parent_of_origin.py
file. This parameter, which defaults to True
, controls whether the model checks for violations of assumptions regarding variances between homozygotes and heterozygotes during the fitting process. If violations are detected, the method will return early, setting specific output values accordingly. Additionally, modifications in the test file enhance the data generation process.
Files | Change Summary |
---|---|
python/python/bystro/parent_of_origin/parent_of_origin.py |
Added assess_model_assumptions: bool = True to the constructors of two classes. Updated the fit method to include checks based on this parameter. |
python/python/bystro/parent_of_origin/tests/test_parent_of_origin.py |
Increased the number of individuals in data generation from 20,000 to 200,000 and introduced new variables X and y for phenotypes and genotypes. |
POESingleSNP
class in the same file, adding new attributes related to statistical measures, which may interact with the new assess_model_assumptions
parameter introduced in the main PR.fit
method, which is directly related to the changes made in the main PR that also involve the fit
method and its logic for handling statistical computations.assess_model_assumptions
parameter.In the land of code where rabbits hop,
A new parameter helps us stop!
With checks for variances, oh so bright,
We ensure our models fit just right.
Hooray for changes, letβs give a cheer,
For assumptions kept safe, we have no fear! πβ¨
We can save massive amounts of computational effort verifying that the data match the model assumptions, namely that the variance observed in the heterozygotes should match or exceed the homozygotes. If this fails we might as well save the computation time and artificially force non-significance of the SNP.
Summary by CodeRabbit
New Features
assess_model_assumptions
, to enhance model validation during fitting.Bug Fixes
Tests