GEV 不合适

发布于 2025-01-14 19:31:09 字数 791 浏览 2 评论 0原文

我有每年的最大值,我尝试对其进行 GEV 分析。然而,当尝试时,pdf 根本不适合数据。我尝试最小化类似问题中提出的建议,但这效果不佳。代码如下:

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import genextreme

yearly_max = [3465, 3461, 3318, 3304, 3211, 3307, 3224, 3440, 3317, 3393, 3360, 3695,
            3265, 3328, 3326, 3272, 3479, 3275, 3355, 3316, 3324, 3411, 3298, 3424,
            3311, 3387, 3374, 3320, 3307, 3343, 3440]

shape_gev, location_gev, scale_gev = genextreme.fit(yearly_max)

input_WL = np.linspace(2000, 6000, 1000)
pdf_gev = genextreme.pdf(input_WL, shape_gev, loc=location_gev, scale=scale_gev)
plt.hist(yearly_max, bins=40, range=(3000, 4000), density = True, label="normed occurence")
plt.plot(input_WL, pdf_gev, linewidth=4, label='pdf')

有人可以帮我解决这个问题吗?

I have yearly maxima for which I tried doing a GEV-analysis. However, when trying, the pdf does not fit the data at all. I tried minimizing like proposed at similar questions but this did not work as well. The code can be found below:

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import genextreme

yearly_max = [3465, 3461, 3318, 3304, 3211, 3307, 3224, 3440, 3317, 3393, 3360, 3695,
            3265, 3328, 3326, 3272, 3479, 3275, 3355, 3316, 3324, 3411, 3298, 3424,
            3311, 3387, 3374, 3320, 3307, 3343, 3440]

shape_gev, location_gev, scale_gev = genextreme.fit(yearly_max)

input_WL = np.linspace(2000, 6000, 1000)
pdf_gev = genextreme.pdf(input_WL, shape_gev, loc=location_gev, scale=scale_gev)
plt.hist(yearly_max, bins=40, range=(3000, 4000), density = True, label="normed occurence")
plt.plot(input_WL, pdf_gev, linewidth=4, label='pdf')

Can someone please help me solving this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文