New submission from Raymond Hettinger <[email protected]>:
I've had a couple of requests for a z-score method, once to produce an actual
z-score for output and another as a way of normalizing gaussian inputs for
machine learning.
Proposed:
>>> iq = NormalDist(100, 15)
>>> iq.zscore(142)
2.8
Same result as:
>>> (142 - iq.mean) / iq.stdev
2.8
There is some question about whether to name it zscore or z_score. Numpy uses
zscore but numpy tends to scrunch names where we would tend to spell them out
or use an underscore for readability.
See: https://en.wikipedia.org/wiki/Standard_score
----------
assignee: rhettinger
components: Library (Lib)
messages: 366484
nosy: rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: Add z_score to statistics.NormalDist
type: enhancement
versions: Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com