Skip to content

Commit ad5604c

Browse files
farhanreynaldoricardoV94
authored andcommitted
add test for rice b and skewnorm tau params
1 parent 5c4b603 commit ad5604c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pymc3/tests/test_distributions_random.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,13 @@ class TestSkewNormal(BaseTestDistribution):
521521
]
522522

523523

524+
class TestSkewNormalTau(BaseTestDistribution):
525+
pymc_dist = pm.SkewNormal
526+
pymc_dist_params = {"mu": 0.0, "tau": 1.0, "alpha": 5.0}
527+
expected_rv_op_params = {"mu": 0.0, "sigma": 1.0 ** -0.5, "alpha": 5.0}
528+
tests_to_run = ["check_pymc_params_match_rv_op"]
529+
530+
524531
class TestRice(BaseTestDistribution):
525532
pymc_dist = pm.Rice
526533
nu = sigma = 2
@@ -535,6 +542,14 @@ class TestRice(BaseTestDistribution):
535542
]
536543

537544

545+
class TestRiceB(BaseTestDistribution):
546+
pymc_dist = pm.Rice
547+
b, sigma = 1, 2
548+
pymc_dist_params = {"b": b, "sigma": sigma}
549+
expected_rv_op_params = {"nu": b * sigma, "sigma": sigma}
550+
tests_to_run = ["check_pymc_params_match_rv_op"]
551+
552+
538553
class TestStudentTLam(BaseTestDistribution):
539554
pymc_dist = pm.StudentT
540555
lam, sigma = get_tau_sigma(tau=2.0)

0 commit comments

Comments
 (0)