0

I have a vector of numbers (both positive and negative). How can I normalize it so the values of the normalized vector will be between 0 and 1?

ABC
  • 23
  • 2

1 Answers1

2

This is called unity-based normalization. If you have a vector $X$, you can obtain a normalized version of it, say $Z$, by doing:

$$Z = \frac{X - \min(X)}{\max(X) - \min(X)}$$

stochazesthai
  • 4,616
  • 2
  • 18
  • 26