# Is there a min max normalization function with the middle weighted towards 1?

So the standard min max is $$\ \frac{x - \min(x)}{ \max(x) - \min(x)}$$ or something like that.

Given a range like 0 to 500 I would like 250 to normalize to 1, 0 and 500 to 0. What is the proper way to do this? Apologies if this is duplicate, I wasn't sure how to search for the question, because I don't know if this exists and has a name.

• Because there are many solutions possible and no basis for preferring one over the other, please explain why you want to do this and also provide any additional constraints you might like to apply. – whuber Aug 6 '15 at 19:19

## 3 Answers

Try this... $$1-\bigg|\frac{2x-\max(x)-\min(x)}{\max(x)-\min(x)}\bigg|$$

• First shift the values to range [-250, 250]: $x \mapsto x - 250$
• Now, scale the values to range [-1, 1]: $x \mapsto \frac{x - 250}{250}$
• Fit a triangular function [1] on this range: $x \mapsto 1 - \left| \frac{x - 250}{250} \right|$

Just normalize to $[0;1]$ as before.

Then scale by 2.

Voila, what used to be 0.5 is now 1.

Now for any value larger than 1, use 2 - x instead.