0
$\begingroup$

For SVMs, they operate best when the data is in the ranges of $[0,1]$ or $[-1, 1]$. Naturally you want to normalize data so that your model works well.

My question is: what do you do about features derived from normalized data?

For example, if I have a data frame with a column called "wait times" in seconds, and I want to add a 50 day moving average to this data to smooth it, do I:

  1. Normalize the "wait times" to the range $[-1, 1]$ and then apply the moving average function
  2. Apply the moving average function and then normalize the "wait times" and "ma" column to the range $[-1, 1]$.

I'm having trouble finding any sort of literature on this. I feel like (2) is correct because (1) causes information loss, but I am honestly not sure because I cannot prove it to myself handily. It would be very helpful if someone could explain to me which is right so that I know in the future how best to handle this.

Thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Since it's been almost a week since I asked this I suppose I can answer for anyone coming by.

I suspect you should go with (2). I believe this is true because normalization is based typically upon an average, or subtracting the mean and dividing by the standard deviation or some variation on that.

This means the normalization process is dependent on the moments of the column you're normalizing. In the example, I don't believe that the moving average done on the normalized wait time would be accurate because we would lose information on the moments by normalizing.

As such, you need to normalize each column after generating all the data for analysis, rather than normalizing the "main column" you're analyzing and then applying analysis.

I wish someone with more experience would confirm this for me, but until someone does, I believe this is correct.

$\endgroup$

Your Answer

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