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
fit() is used to compute the parameter needed for transformation and transform() is for scaling the data to convert into standard format for the model.
fit_tranform() is combination of two which is doing above work in efficiently.
Since fit_transform() is already computing and transforming the training data only transformation for testing data is left,since parameter needed for transformation is already computed and stored only transformation() of testing data is left therefor only transform() is used instead of fit_transform().