LoginSignup
0
0

More than 1 year has passed since last update.

MinMaxScalerの注意点

Posted at

データ正規化とは、最小値0、最大値1にすること。下記コードのように行う。注意点は、訓練データとテストデータで違うコードを使用すること。

from sklearn.preprocessing import MinMaxScaler

sc=MinMaxScaler()

train_sc=sc.fit_transform(train)
test_sc=sc.transform(test)

訓練データにはfit_transformを使用する
テストデータにはtransformを使用する

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0