from sklearn.preprocessing import StandardScaler

#数据预处理标准化StandardScaler模型
def test_StandardScaler():
    X=[[1,5,1,2,10],
      [2,6,3,2,7],
      [3,7,5,6,4,],
      [4,8,7,8,1]]
    print("before transform:",X)
    scaler=StandardScaler()
    scaler.fit(X)
    print("scale_ is :",scaler.scale_)
    print("mean_ is :",scaler.mean_)
    print("var_ is :",scaler.var_)
    print("after transform:",scaler.transform(X))
    
# 调用 test_StandardScaler
test_StandardScaler()