Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了 Pearson Correlation 的公式,但它给出的值介于 -1 和 1 之间。我将如何修改公式以使其给出介于 0 和 1 之间的值?
要将任何一组数字标准化为介于 0 和 1 之间,请减去最小值并除以范围。
在您的情况下,最小值为 -1,范围为 2,因此如果您的集合中的值为 -0.5,则该值变为:
(-0.5 - (-1)) / 2 = 0.25