You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Totally agree. Nothing is trivial and it's not because it can be written in a single line of code that everyone can write such a line. Such functions are really helpful and everyone uses them when they exists. E.g. in scikit-learn they have a lot of simple metrics.
Maybe this would fit better in a more general place than stats.
Hmm... Going back to 2004 the code always had abs() in it, which I assume is for complex numbers.
I think this would make it consistent with the definition of power, which RMS is proportional to? But I don't have a great reference saying that it should be there.
Is your feature request related to a problem? Please describe.
Long ago there was a
matplotlib.mlab.rms_flat()
that I used frequently to measure signals, but it no longer exists, so I copy and paste the function whenever needed:But this is a mild pain, and there are similar functions like
np.mean()
that don't require any copying and pasting.Ironically, when this was requested in numpy, someone responded with "no that's too simple, just implement it inline" and then suggested an implementation that is incorrect...
Describe the solution you'd like.
So I think it should be in
scipy.stats.rms()
, alongside similar things likescipy.stats.gmean()
andscipy.stats.mode()
.Also we then have the convenience of
axis=
, etc.Describe alternatives you've considered.
scipy.stats
already and creating an alias or more-googleable documentation would be enoughAdditional context (e.g. screenshots, GIFs)
Also called "quadratic mean" and is a special case of generalized mean, requested in #12456
The text was updated successfully, but these errors were encountered: