本文簡要介紹 python 語言中scipy.stats.sampling.TransformedDensityRejection.ppf_hat
的用法。
用法:
TransformedDensityRejection.ppf_hat(u)#
計算 u 處帽子分布的 CDF 的倒數。
- u: array_like
百分位數數組
- ppf_hat: array_like
對應於給定百分位數的分位數數組。
參數 ::
返回 ::
例子:
>>> from scipy.stats.sampling import TransformedDensityRejection >>> from scipy.stats import norm >>> import numpy as np >>> from math import exp >>> >>> class MyDist: ... def pdf(self, x): ... return exp(-0.5 * x**2) ... def dpdf(self, x): ... return -x * exp(-0.5 * x**2) ... >>> dist = MyDist() >>> rng = TransformedDensityRejection(dist) >>> >>> rng.ppf_hat(0.5) -0.00018050266342393984 >>> norm.ppf(0.5) 0.0 >>> u = np.linspace(0, 1, num=1000) >>> ppf_hat = rng.ppf_hat(u)
相關用法
- Python SciPy TukeyHSDResult.confidence_interval用法及代碼示例
- Python SciPy interpolate.make_interp_spline用法及代碼示例
- Python SciPy stats.anderson用法及代碼示例
- Python SciPy ClusterNode.pre_order用法及代碼示例
- Python SciPy stats.iqr用法及代碼示例
- Python SciPy FortranFile.read_record用法及代碼示例
- Python SciPy ndimage.correlate用法及代碼示例
- Python SciPy special.exp1用法及代碼示例
- Python SciPy special.expn用法及代碼示例
- Python SciPy signal.czt_points用法及代碼示例
- Python SciPy interpolate.krogh_interpolate用法及代碼示例
- Python SciPy ndimage.morphological_gradient用法及代碼示例
- Python SciPy distance.sokalmichener用法及代碼示例
- Python SciPy linalg.eigvalsh_tridiagonal用法及代碼示例
- Python SciPy linalg.cdf2rdf用法及代碼示例
- Python SciPy csc_array.diagonal用法及代碼示例
- Python SciPy fft.idctn用法及代碼示例
- Python SciPy linalg.LaplacianNd用法及代碼示例
- Python SciPy linalg.solve_circulant用法及代碼示例
- Python SciPy hierarchy.ward用法及代碼示例
- Python SciPy signal.chirp用法及代碼示例
- Python SciPy stats.genpareto用法及代碼示例
- Python SciPy ndimage.variance用法及代碼示例
- Python SciPy signal.residue用法及代碼示例
- Python SciPy linalg.polar用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.sampling.TransformedDensityRejection.ppf_hat。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。