1
$\begingroup$

I have a doubt about scaling and normalization of training data with grid search, where the score of each node is computed with k-fold cross validation. In particular, should training and scaling be independently computed for each k execution on each node, or only one time before the whole grid search?

In other words, should data be scaled and normalized separately for each candidate?

Thanks!

$\endgroup$

1 Answer 1

3
$\begingroup$

You should always scale based on the train data only, otherwise - you are leaking "knowledge" to the test set.

Therefore, in K-fold CV you should do k normalizations.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.