XrContinuousRV¶
- class xarray_einstats.stats.XrContinuousRV(dist, *args, **kwargs)[source]¶
Wrapper for subclasses of
rv_continuous.Usage examples available at Intro to the stats module
See also
Examples
Evaluate the ppf of a Student-T distribution from DataArrays that need broadcasting:
from xarray_einstats import tutorial from xarray_einstats.stats import XrContinuousRV from scipy import stats ds = tutorial.generate_mcmc_like_dataset(3) dist = XrContinuousRV(stats.t, 3, ds["mu"], ds["sigma"]) dist.ppf([.1, .5, .6])
<xarray.DataArray (quantile: 3, chain: 4, draw: 10, team: 6)> Size: 6kB -3.796 -3.516 -2.506 -1.706 -3.562 -3.648 ... 0.7499 0.9269 1.166 0.9678 0.7404 Coordinates: * quantile (quantile) float64 24B 0.1 0.5 0.6 * chain (chain) int64 32B 0 1 2 3 * draw (draw) int64 80B 0 1 2 3 4 5 6 7 8 9 * team (team) <U1 24B 'a' 'b' 'c' 'd' 'e' 'f'
Methods
XrContinuousRV.__init__(dist, *args, **kwargs)XrContinuousRV.cdf(*args[, apply_kwargs])Method wrapping
.cdfof the input distribution withxarray.apply_ufuncXrContinuousRV.isf(*args[, apply_kwargs])Method wrapping
.isfof the input distribution withxarray.apply_ufuncXrContinuousRV.logcdf(*args[, apply_kwargs])Method wrapping
.logcdfof the input distribution withxarray.apply_ufuncXrContinuousRV.logpdf(*args[, apply_kwargs])Method wrapping
.logpdfof the input distribution withxarray.apply_ufuncXrContinuousRV.logsf(*args[, apply_kwargs])Method wrapping
.logsfof the input distribution withxarray.apply_ufuncXrContinuousRV.pdf(*args[, apply_kwargs])Method wrapping
.pdfof the input distribution withxarray.apply_ufuncXrContinuousRV.ppf(*args[, apply_kwargs])Method wrapping
.ppfof the input distribution withxarray.apply_ufuncXrContinuousRV.rvs(*args[, size, ...])Method wrapping
.rvsof the input distribution withxarray.apply_ufuncXrContinuousRV.sf(*args[, apply_kwargs])Method wrapping
.sfof the input distribution withxarray.apply_ufunc