gradhep / neos

Upstream optimisation for downstream inference
BSD 3-Clause "New" or "Revised" License
69 stars 5 forks source link

fix transforms #19

Open lukasheinrich opened 3 years ago

lukasheinrich commented 3 years ago

just jotting this down here for later to_inf_vec has a small bug. Should be

def to_inf_vec(param, bounds):
    bounds = jnp.asarray(bounds)
    a, b = bounds[:, 0], bounds[:, 1]
    x = 2.0 * (param - a) / (b - a) - 1.0
    return jnp.arcsin(x)