what is the difference between fit() ,fit_transform() and transform() in scikit_learn?
本问题已经有最佳答案,请猛点这里访问。
这是我使用fit_TransFrom()和transFrom()进行功能缩放的代码。
1 2 3 4 5 | ##Feature scaling from sklearn.preprocessing import StandardScaler sc_x=StandardScaler() X_train=sc_x.fit_transform(X_train) X_test=sc_x.transform(X_test) |