This repository was archived by the owner on Oct 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -468,17 +468,17 @@ class DifferentialExpressionTestLRT(_DifferentialExpressionTestSingle):
468468
469469 sample_description : pd .DataFrame
470470 full_design_loc_info : patsy .design_info
471- full_estim : glm .train .numpy .glm_nb .Estimator
471+ full_estim : glm .train .numpy .glm_base .Estimator
472472 reduced_design_loc_info : patsy .design_info
473- reduced_estim : glm .train .numpy .glm_nb .Estimator
473+ reduced_estim : glm .train .numpy .glm_base .Estimator
474474
475475 def __init__ (
476476 self ,
477477 sample_description : pd .DataFrame ,
478478 full_design_loc_info : patsy .design_info ,
479- full_estim : glm .train .numpy .glm_nb .Estimator ,
479+ full_estim : glm .train .numpy .glm_base .Estimator ,
480480 reduced_design_loc_info : patsy .design_info ,
481- reduced_estim : glm .train .numpy .glm_nb .Estimator
481+ reduced_estim : glm .train .numpy .glm_base .Estimator
482482 ):
483483 super ().__init__ ()
484484 self .sample_description = sample_description
Original file line number Diff line number Diff line change 99logger = logging .getLogger (__name__ )
1010
1111
12- class TestAccuracyGlmNb (
12+ class TestConvergence (
1313 unittest .TestCase
1414):
1515 """
1616 Test whether optimizers yield exact results for negative binomial distributed data.
1717 """
1818
19- def test_full_nb (self ):
20- logging .getLogger ("batchglm" ).setLevel (logging .INFO )
21- logger .error ("TestAccuracyGlmNb.test_full_nb()" )
22-
19+ def _test_full_model (self , noise_model ):
2320 np .random .seed (1 )
2421 adata = sc .datasets .pbmc3k ()
2522 tf = "MALAT1"
@@ -37,11 +34,15 @@ def test_full_nb(self):
3734 quick_scale = False ,
3835 init_a = "all_zero" ,
3936 size_factors = None ,
40- noise_model = "nb" ,
37+ noise_model = noise_model ,
4138 backend = "numpy"
4239 )
4340 _ = temp .summary ()
4441
42+ def test (self ):
43+ for noise_model in ['norm' , 'poisson' , 'nb' ]:
44+ self ._test_full_model (noise_model )
45+
4546
4647if __name__ == '__main__' :
4748 unittest .main ()
You can’t perform that action at this time.
0 commit comments