Talk:Normalize
I think Normalize should be deprecated and eventually removed from Analytica. Here's why:
When you have a 1-D vector of data, and you say you want to normalize the points, there are three different meanings that people intend, depending on the context:
- They want to scale the values so they add to 1. E.g.:
- x / Sum(x,i)
- They want to scale a vector so it has unit length, e.g.:
- They want to scale a continuous curve to have unit area, i.e., so the indefinite integral is 1.0, e.g.:
- x / Area(x,i)
Analytica's Normalize function implements the third meaning.
What makes Normalize so undesirable is that I believe it may be a common cause of errors in models, and worst of all, these are the types of errors that are likely to go unnoticed. All three meanings result in result that are pretty close numerically, so the discrepancy between what the modeler intended and what is computed could easily go unnoticed.
If someone wanted to normalize in the first or second sense, they might go looking for a function to do this, see Normalize(), notice that its parameters seem to match what they are looking for, its name sounds like it is doing what they want, and its computed values appear to be pretty close to what they expect, so they never realize it is computing something different.
It would be better to force people to divide explicitly, to ensure they are normalizing in the intended way. I would also find it reasonable to replace Normalize with better-named functions, perhaps: NormalizeSum, NormalizeVect, and NormalizeArea.
Please weigh in with your opinions here!
Enable comment auto-refresher