1
$\begingroup$

Please let me know what to do when there is a value in the testing set is bigger than the max value used to min-max normalize the training set building a histogram classifier.

Do I go back and change the bounds of the min-max normalization for the training set? Wouldn't that violate the notion that your training set should generalize to any testing set on its own and that you should retroactively change the what was done during the classifier building on the training set based on future testing sets that you are not supposed to know?

Do I change the bounds of the min-max normalization to the the min and max of the testing set? But, you are supposed to use the same transformation on the testing set as the training set, right?

$\endgroup$
1
$\begingroup$

You normalize the test data the same way your normalized the training data. If you subtracted $a$ and then divided by $b$ for the training data, do exactly the same transformation yo your test data.

Remember what you’re trying to do with out-of-sample testing: check if your method applied in training generalizes to unseen data. If you do something different to the test data, then you’re not checking that.

$\endgroup$
3
  • $\begingroup$ When I do that, the value that I am having an issue with (in the testing set) does not get normalized (because it is greater than the max value in the training set), and therefor gives out of bounds errors. Can you please let me know if I am supposed go back and change the bounds of the min-max normalization for the training set (to set the max to be at least as big as the maximum of the testing set)? $\endgroup$
    – user277471
    Mar 27 '20 at 1:37
  • $\begingroup$ What are “out of bounds errors”? $\endgroup$
    – Dave
    Mar 27 '20 at 1:39
  • $\begingroup$ The (failed) normalized value is used in my classifier to bin the value in an array index that does not exist because there are as many indices as subintervals that the interval [0,1] is divided into (for a histogram), and said value is greater than 1. $\endgroup$
    – user277471
    Mar 27 '20 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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