code_4.py 181 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3
from sklearn.preprocessing import Standard Scaler # 导入特征缩放器
sc = Standard Scaler() # 特征缩放器
X_train = sc.fit_transform(X_train) # 拟合并应用于训练集