📅  最后修改于: 2022-03-11 14:45:28.510000             🧑  作者: Mango
# Scale the features to between -1 and 1
from sklearn.preprocessing import MinMaxScaler
scaler=MinMaxScaler((-1,1))
x=scaler.fit_transform(features)
y=labels
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html