Python中scipy中weibull分布的计算

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiangcheng001/article/details/77559649

scipy.stats.exponweib:scipy包中计算weibull分布的函数。

from scipy.stats import exponweib


密度函数的格式:exponweib.pdf(x, a, c) = a * c * (1-exp(-x**c))**(a-1) * exp(-x**c)*x**(c-1),这个形式很奇怪


在官方文档说a和c是shape parameter,扩展的loc和scale参数,exponweib.pdf(x, a, c, loc, scale) = exponweib.pdf(x-loc/scale, a,c)这个格式。


函数:

rvs(a, c, loc=0, scale=1, size=1, random_state=None)Random variates.,服从weibull分布的随机变量
pdf(x, a, c, loc=0, scale=1) Probability density function.概率密度函数
logpdf(x, a, c, loc=0, scale=1) Log of the probability density function.概率密度函数的对数形式
cdf(x, a, c, loc=0, scale=1) Cumulative density function.累积分布函数
logcdf(x, a, c, loc=0, scale=1) Log of the cumulative density function.累积分布函数的对数形式
sf(x, a, c, loc=0, scale=1) Survival function (also defined as 1 - cdf, but sf is sometimes more accurate).生存函数,1-cdf的形式
logsf(x, a, c, loc=0, scale=1) Log of the survival function.生存函数的对数形式
ppf(q, a, c, loc=0, scale=1) Percent point function (inverse of cdf — percentiles).累积分布函数的分位点
isf(q, a, c, loc=0, scale=1) Inverse survival function (inverse of sf).,逆函数
moment(n, a, c, loc=0, scale=1) Non-central moment of order n
stats(a, c, loc=0, scale=1, moments='mv') Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’).分布的一些统计值
entropy(a, c, loc=0, scale=1) (Differential) entropy of the RV.熵
fit(data, a, c, loc=0, scale=1) Parameter estimates for generic data.参数估计
expect(func, args=(a, c), loc=0, scale=1, lb=None, ub=None, conditional=False, **kwds)Expected value of a function (of one argument) with respect to the distribution.期望
median(a, c, loc=0, scale=1) Median of the distribution.中位值
mean(a, c, loc=0, scale=1) Mean of the distribution.平均值
var(a, c, loc=0, scale=1) Variance of the distribution.方差
std(a, c, loc=0, scale=1) Standard deviation of the distribution.标准差
interval(alpha, a, c, loc=0, scale=1) Endpoints of the range that contains alpha percent of the distribution,百分比的点估计

猜你喜欢

转载自blog.csdn.net/xiangcheng001/article/details/77559649
今日推荐