def check_fit(bparams, meta): meta = meta / 100 f2 = jmutils.beta_cdf_two_pts(0, .2, bparams[0], bparams[1]) f5 = jmutils.beta_cdf_two_pts(0, .5, bparams[0], bparams[1]) f8 = jmutils.beta_cdf_two_pts(0, .8, bparams[0], bparams[1]) resid = (f2 - meta[0])**2 + (f5 - meta[1])**2 + (f8 - meta[2])**2 return resid
def bcdf(x, bp1, bp2): return jmutils.beta_cdf_two_pts(0, x, bp1, bp2)