Skip to content

Commit

Permalink
enables extrapolation per default
Browse files Browse the repository at this point in the history
  • Loading branch information
MArpogaus committed Feb 6, 2024
1 parent 978385b commit 703b68b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bernstein_flow/bijectors/bernstein.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class BernsteinBijector(tfb.AutoCompositeTensorBijector):
def __init__(
self,
thetas: tf.Tensor,
extrapolation: str = False,
extrapolation: str = True,
name: str = "bernstein_bijector",
**kwds,
) -> None:
Expand Down

5 comments on commit 703b68b

@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.748699426651001

Parameter Vector

a1 = array([1.3380866], dtype=float32)
b1 = array([-0.19137305], dtype=float32)
thetas = array([-4.        , -2.1791925 , -0.3583851 , -0.3582275 , -0.3581648 ,
   -0.35811266, -0.35807484, -0.35803714, -0.3578867 , -0.35186327,
    1.916428  ,  2.958209  ,  3.99999   ], dtype=float32)

Flow

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.

Old Faithful

Learning Curve

Metrics

Min of loss: -0.6988195776939392

Parameter Vector

a1 = array([1.1738902], dtype=float32)
b1 = array([-0.06661737], dtype=float32)
thetas = array([-4.        , -3.9242513 , -3.8485026 , -0.34434104, -0.34322524,
   -0.34309176, -0.34304762, -0.34302008, -0.34298947, -0.34284553,
    0.26027724,  2.1301334 ,  3.9999895 ], dtype=float32)

Flow

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.8571603298187256
val_loss: -0.889269232749939

Results

Parameter Vector for x = 1

BernsteinFlow:
invert_chain_of_bpoly_of_scale1_of_shift1:
chain_of_bpoly_of_scale1_of_shift1:
bpoly: [-3. -2.086549 -1.1730981 -0.61390036 -0.12805605 -0.128044
-0.128034 -0.128024 -0.128014 -0.128004 -0.127994 -0.127984
-0.127974 -0.127964 -0.127954 -0.1279016 16.778963 16.85717
16.935377 ]
scale1: 0.42007723450660706
shift1: 0.6088889837265015

Flow



Bijector


@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.8502300381660461
val_loss: -0.8915879726409912

Results

Parameter Vector for x = 1

BernsteinFlow:
invert_chain_of_bpoly_of_scale1_of_shift1:
chain_of_bpoly_of_scale1_of_shift1:
bpoly: [-3.0000002 -2.0772877 -1.1545751 -0.10105002 -0.09790469 -0.09789469
-0.09788469 -0.09787469 -0.09786469 -0.0978547 -0.0978447 -0.0978347
-0.0978247 -0.0978147 -0.0978047 -0.0977947 44.076836 44.076847
44.07686 ]
scale1: 0.3852212429046631
shift1: 0.6199966669082642

Flow



Bijector


@MArpogaus
Copy link
Owner Author

Choose a reason for hiding this comment

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

Hey @oduerr,

i took some time to refactor the code in order to make it work with the latest version of tf and tfp.
If you have some free time, it would be great if you could test if it works on your machine.

Cheers,
Marcel

Please sign in to comment.