What is wrong with this python function from “Programming Collective Intelligence”?

后端 未结 4 1033
梦如初夏
梦如初夏 2021-01-06 07:31

This is the function in question. It calculates the Pearson correlation coefficient for p1 and p2, which is supposed to be a number between -1 and 1.

When I use this

4条回答
  •  灰色年华
    2021-01-06 07:36

    Well it took me a minute to read over the code but it seems if you change your input data to floats it will work

提交回复
热议问题