from sklearn.preprocessing import MinMaxScaler()
scaler = MinMaxScaler()
can I directly do:
scaled_data = scaler.fit_transform(mymatrix)
without doing scaler.fit(mymatrix)
first?
If not, why so? What is the difference? Doesnt scaler.fit_transform()
function already compute the variance and mean values too before transforming?
正如您在此处的文档中所见,您可以,因为fit_transform
首先执行fit(),
然后再应用transform()
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.