Skip to content

Conversation

@swallan
Copy link
Owner

@swallan swallan commented May 31, 2022

Reference issue

What does this implement/fix?

When c=0, genextreme is equal to gumbel_r. This can be leveraged in the fit method so that when c is fixed to 0, return the results of the much faster fit method from gumbel_r.:

In [23]: import numpy as np

In [24]: data = stats.genextreme.rvs(c=0,loc=2, scale=1, size=100, random_state=np.random.default_rng(432423))

In [25]: %timeit stats.genextreme.fit(data, fc=0)
673 µs ± 62.6 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)

In [27]: %timeit super(type(stats.genextreme), stats.genextreme).fit(data, fc=0)
21.6 ms ± 1.61 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants