Author rhettinger
Recipients rhettinger, steven.daprano
Date 2020-04-15.03:14:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586920449.06.0.712419472387.issue40290@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-04-15 03:14:09rhettingersetrecipients: + rhettinger, steven.daprano
2020-04-15 03:14:09rhettingersetmessageid: <1586920449.06.0.712419472387.issue40290@roundup.psfhosted.org>
2020-04-15 03:14:09rhettingerlinkissue40290 messages
2020-04-15 03:14:08rhettingercreate