def chi2p(x2, df=1, tail=UPPER):
    return gammai(df * 0.5, x2 * 0.5, tail)

#o, e = [[44, 56]], [[50, 50]]
#assert round(chi_squared(o, e)[0], 4)  == 1.4400
#assert round(chi_squared(o, e)[1], 4)  == 0.2301

#--- PEARSON'S LOG LIKELIHOOD RATIO APPROXIMATION --------------------------------------------------
Returns predictions for a single batch of samples.
dataset/ETHPy150Open clips/pattern/pattern/metrics.py/chi2p--crossover with--dataset/ETHPy150Open fchollet/keras/keras/models.py/Sequential.predict_on_batch