Skip to content

Commit

Permalink
fixes tests for weibul and student-t base distribustions
Browse files Browse the repository at this point in the history
  • Loading branch information
MArpogaus committed Oct 3, 2023
1 parent ec74ee8 commit 70a7fa3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/distributions/test_bernstein_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ def test_student_t(self):
dtype=dtype,
base_distribution=student_t,
thetas_constrain_fn=get_thetas_constrain_fn(
low=-25, high=25, allow_flexible_bounds=True
low=-35, high=35, allow_flexible_bounds=True
),
scale_base_distribution=False,
clip_to_bernstein_domain=False,
bb_class=BernsteinBijectorLinearExtrapolate,
)
self.f(normal_dist, trans_dist)

Expand All @@ -243,10 +245,14 @@ def test_weibull(self):
order=10,
dtype=dtype,
base_distribution=weibull,
thetas_constrain_fn=get_thetas_constrain_fn(low=1e-10, high=50),
thetas_constrain_fn=get_thetas_constrain_fn(low=1e-12, high=100),
bb_class=BernsteinBijectorLinearExtrapolate,
clip_to_bernstein_domain=False,
scale_base_distribution=False,
shift_data=False,
scale_data=False,
)
self.f(normal_dist, trans_dist)
self.f(normal_dist, trans_dist, stay_in_domain=True)

@pytest.mark.skip
def test_small_numbers(self):
Expand Down

2 comments on commit 70a7fa3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old Faithful

Learning Curve

Metrics

Min of loss: -0.7430652379989624

Parameter Vector

a1 = array([7.399017], dtype=float32)
b1 = array([-0.52731043], dtype=float32)
thetas = array([-4.        , -0.30206275, -0.29629907, -0.29544288, -0.29515794,
   -0.29501364, -0.29491523, -0.29314813, -0.26503685,  3.9999893 ],
  dtype=float32)
a2 = array([1.3188093], dtype=float32)

Results

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bimodal Model

Learning Curve

Learning Curve

Metrics

loss: -0.8930793404579163
val_loss: -0.9371293783187866

Results

Parameter Vector for x = 1

BernsteinFlow:
invert_chain_of_bpoly_of_scale1_of_shift1:
chain_of_bpoly_of_scale1_of_shift1:
bpoly: [-3.0000067e+00 -2.1729650e+00 -1.3459234e+00 -1.3354638e+00
-1.8178105e-02 -6.7528738e-03 -6.7383186e-03 -6.7237634e-03
-6.7092082e-03 -6.6946531e-03 -6.6800979e-03 -6.6655427e-03
-6.6509875e-03 -6.6364324e-03 -6.6218772e-03 -6.6073220e-03
-2.5608107e-03 6.3135967e+00 1.2629754e+01]
scale1: 0.47053301334381104
shift1: 0.67279452085495

Flow



Bijector


Please sign in to comment.