Comments (5)
I am not familiar with the PR rules of this repository, so may I ask you to do this on my behalf?
It is already midnight in Japan and I am going to bed.
Thank you so much.
from scipy.
Yes, according to Wikipdia,
our implementation is missing that factor of 11
.
It's probably missed by our generic tests because the generic calculation is inaccurate.
To generate your reference in Mathematica, are you using Kurtosis
or ExcessKurtosis
? I'm a surprised to see an explicit +3
in the formula if it's really the excess kurtosis.
Would you like to submit a PR @tk-yoshimura?
from scipy.
Just out of curiousity, I checked whether scipy.integrate._tanhsinh._nsum
would have provided a better generic implementation here. There are probably acceleration methods that would achieve great accuracy with fewer function evaluations, but the integral approximation is nice since it will work for pretty much any monotonically decreasing sequence.
import scipy.stats as stats
stats.yulesimon._munp(4, 5) # 51.50194329138698 and warning that sum doesn't converge
stats.yulesimon.moment(4, 5) # 52.083333333333336 (after this correction)
import numpy as np
from scipy.integrate._tanhsinh import _nsum
from scipy._lib._util import _lazywhere
def f(x):
return _lazywhere(np.isfinite(x), (x,),
lambda x: stats.yulesimon._pmf(x, 5)*x**4,
fillvalue=0)
_nsum(f, 1, np.inf)
# success: True
# status: 0
# sum: 52.083333333330906
# error: 2.792518871722942e-07
# nfev: 33181
(actual relative error 5e-14
)
from scipy.
I am glad my code correction was correct.
Many thanks.
If you are interested in the stable distribution of half-integer shape parameter numbers not yet implemented in scipy, I have a C# implementation in my repository below.
https://github.com/tk-yoshimura/DoubleDoubleStatistic
from scipy.
Thanks @tk-yoshimura. I'll pass the link to the stable distribution to the right people. In the meantime, would you like to submit a PR to fix the kurtosis
implementation, or would you like me to take care of it? If you do it, I can review and get it merged. If I do it, I'll need to wait for another maintainer to review and merge.
from scipy.
Related Issues (20)
- ENH: `ndimage.map_coordinates`: avoid array copy for big endian data HOT 4
- BUG: `interpolate.BSpline.basis_element` differs from `BSpline` on the last spline HOT 1
- BUG: scipy.optimize.curve_fit full_output and boundaries incompatible HOT 1
- DOC/DEV: Developer docs should mention Accelerate support HOT 5
- BUG: stats.kstest: units stripped from `astropy.unit.Quantity` objects starting with 1.12.0 HOT 1
- BUG: `zsh: abort python` after `scipy.linalg.sqrtm` on empty `np.array` on M1 Macbook via conda HOT 1
- BUG: special.lpmv(0,v,-1) returns incorrect value for non-integer v
- ENH: integrate: evaluate simultaneously a function and its jacobian for ODE integration HOT 2
- BUG: sparse.csgraph.dijkstra errors on inputs with int64 or no indices
- BUG: positional argument `DeprecationWarning` message is overly long HOT 10
- TST: TestEig.test_singular failing tolerance with generic BLAS installed HOT 2
- BUG: interpolate.griddata: memory leak in linear mode under Python 3.12 HOT 10
- DOC: Old SciPy version in embedded Jupyterlite notebooks HOT 13
- DOC: stats: wrong docstrings of `*Result` classes HOT 2
- BUG: Can't build scipy on main (1.15.0.dev0), PyObject_Vectorcall* not found HOT 3
- ENH: integrate: add array API-support HOT 2
- MAINT: Premature setting of attributes in `HBInfo` in `scipy.io._harwell_boeing`. HOT 2
- TST: tolerance violations with SciPy 1.14.0rc1 on linux-{aarch64,ppc64le}
- How to extract the p-value from the scipy.stats.ranksums result? HOT 1
- how to compute the exact p HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scipy.