from sklearn.preprocessing import MaxAbsScaler #数据预处理标准化MaxAbsScaler模型 def test_MaxAbsScaler(): 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=MaxAbsScaler() scaler.fit(X) print("scale_ is :",scaler.scale_) print("max_abs_ is :",scaler.max_abs_) print("after transform:",scaler.transform(X)) # 调用 test_MaxAbsScaler test_MaxAbsScaler()