您的位置:首页 > 编程语言 > Python开发

python计算ecdf代的函数

2018-03-13 21:53 239 查看
def ecdf(data):
"""Compute ECDF for a one-dimensional array of measurements."""

# Number of data points: n
n = len(data)

# x-data for the ECDF: x
x = np.sort(data)

# y-data for the ECDF: y
y = np.arange(1, n+1) / n

return x, y
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: