a = (x - x.mean()) * (y - y.mean()) # 公式計算AQI與Precipitation的協方差。 cov = np.sum(a) / (len(a) - 1) print("協方差:", cov)
確定! 回上一頁