probability
probability copied to clipboard
there is no f distribution
f distribution which is frequently used in f test is not available in tfp.distributions. please support this distribution.
In a pinch, if all you wanted was log_prob/sampling, you could do:
f_dist = tfb.Chain([tfb.Scale(d2 / d1), tfb.Exp()])(tfd.SigmoidBeta(d1 / 2, d2 / 2))
but that won't have the analytic statistics (mean, variance etc) and I don't know how good its numerics will be either.
We certainly could have this distribution implemented properly. Contributions welcome.
Happy to have a look at this one!
https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/distributions/sigmoid_beta.py should be a good template to follow, as it's closely related to the f distribution (as shown by my snippet). Obviously you wouldn't use the snippet directly, and use the log-prob etc formulas directly. Maybe call it FisherSnedecor