jax.random.f#
- jax.random.f(key, dfnum, dfden, shape=None, dtype=<class 'float'>)[source]#
Sample F-distribution random values with given shape and float dtype.
The values are distributed according to the probability density function:
\[f(x; \nu) \propto x^{\nu_1/2 - 1}\left(1 + \frac{\nu_1}{\nu_2}x\right)^{ -(\nu_1 + \nu_2) / 2}\]on the domain \(0 < x < \infty\). Here \(\nu_1\) is the degrees of freedom of the numerator (
dfnum
), and \(\nu_2\) is the degrees of freedom of the denominator (dfden
).- Parameters:
key (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) – a PRNG key used as the random key.dfnum (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) – a float or array of floats broadcast-compatible withshape
representing the numerator’sdf
of the distribution.dfden (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) – a float or array of floats broadcast-compatible withshape
representing the denominator’sdf
of the distribution.shape (
Optional
[Sequence
[int
]]) – optional, a tuple of nonnegative integers specifying the result shape. Must be broadcast-compatible withdfnum
anddfden
. The default (None) produces a result shape equal todfnum.shape
, anddfden.shape
.dtype (
Union
[str
,type
[Any
],dtype
,SupportsDType
]) – optional, a float dtype for the returned values (default float64 if jax_enable_x64 is true, otherwise float32).
- Return type:
- Returns:
A random array with the specified dtype and with shape given by
shape
ifshape
is not None, or else bydf.shape
.