In [40]: from scipy.stats import genextreme
In [41]: shape = -0.5
In [42]: loc = 0.0
In [43]: scale = 2.5
In [44]: x = np.linspace(scale/shape, 20, 200)
In [45]: y = genextreme.cdf(x, shape, loc, scale)
In [46]: import matplotlib.pyplot as plt
In [47]: plt.plot(x, y, label="GEV CDF")
Out[47]: [<matplotlib.lines.Line2D at 0x10e135790>]
In [48]: plt.legend(loc='best')
Out[48]: <matplotlib.legend.Legend at 0x10de4cc50>
使用^{} 的
cdf
方法。在例如,下面的ipython会话。。。在
生成此绘图:
注意,scipy代码中的形状参数
c
与{a3}中使用的形状参数ξ有相反的符号。在相关问题 更多 >
编程相关推荐