1
$\begingroup$

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.

$\endgroup$
1
  • 7
    $\begingroup$ 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. $\endgroup$
    – whuber
    Commented Aug 6, 2015 at 19:19

3 Answers 3

1
$\begingroup$

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

$\endgroup$
1
$\begingroup$
  • 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|$

[1] https://en.wikipedia.org/wiki/Triangular_function

$\endgroup$
0
1
$\begingroup$

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.

$\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.