When scale the data, why the train dataset use 'fit' and 'transform', but the test dataset only use 'transform'?

后端 未结 7 1925
悲&欢浪女
悲&欢浪女 2021-02-01 03:32

When scale the data, why the train dataset use \'fit\' and \'transform\', but the test dataset only use \'transform\'?

SAMPLE_COUNT = 5000
TEST_COUNT = 20000
see         


        
相关标签:
7条回答
  • 2021-02-01 04:31

    we use fit() or fit_transform() in order to learn (to train the model) on the train data set. transform() can be used on the trained model against the test data set.

    0 讨论(0)
提交回复
热议问题