You can never normalize that. Also important to note that to ensure consistency, you should not return NaN or any other null value. The normalized form of v=0 is indeed v=0 . "The normalized form of v=0 is indeed v=0." This doesn't make sense: as you said yourself, the zero vector cannot be normalized.
How do you normalize data with 0?
How to Normalize Data Between 0 and 1
- To normalize the values in a dataset to be between 0 and 1, you can use the following formula:
- zi = (xi – min(x)) / (max(x) – min(x))
- where:
- For example, suppose we have the following dataset:
- The minimum value in the dataset is 13 and the maximum value is 71.
Is normalized data between 0 and 1?
Min-max normalization is one of the most common ways to normalize data. For every feature, the minimum value of that feature gets transformed into a 0, the maximum value gets transformed into a 1, and every other value gets transformed into a decimal between 0 and 1.