📜  zscore python 代码示例

📅  最后修改于: 2022-03-11 14:46:44.842000             🧑  作者: Mango

代码示例1
from scipy import stats

a = np.array([ 0.7972,  0.0767,  0.4383,  0.7866,  0.8091,
               0.1954,  0.6307,  0.6599,  0.1065,  0.0508])

stats.zscore(a) # z = (x - avg) / std
>>> array([ 1.1273, -1.247 , -0.0552,  1.0923,  1.1664, 
           -0.8559, 0.5786, 0.6748, -1.1488, -1.3324])