I am learning about standardization and normalization concepts for feature engineering.

Standardization is done for example using z-score where based on the mean and std deviation we re-calculate the values so that the mean is 0 and std deviation is 1. This is a column wise operation.

Where as Normalization is performed row wise (to make the entire row unit norm) – thus making it good for calculating things like cosine similarity. I am looking for an example of what it means to make the row unit norm.

  • $\begingroup$ Normalization is not by definiton row-wise! You can apply it to rows or to columns. Please clarify the setting and your question. $\endgroup$ Sep 11, 2020 at 10:00
  • $\begingroup$ I'm looking for practical example with respect to normalizing row - to understand what exactly it means to normalize a row to and what it means to have a unit norm. $\endgroup$
    – variable
    Sep 11, 2020 at 12:16
  • $\begingroup$ Each non-zero vector $v$ gives rise to the ray $\lambda v$ with $\lambda \geq 0$. Normalization is the intersection of the ray with the unit-sphere. $\endgroup$ Sep 11, 2020 at 21:31

1 Answer 1


A very simple example is the use of relative frequency instead of absolute frequency, for instance in text classification: if the features represent the raw absolute frequency of every word, then large documents have higher values than small documents. In this case the learning algorithm won't be able to distinguish between a word used 10 times in a small 50 words document (so this word is important for the document) vs. the same word used 10 times but in a large 1000 words document (not very important for the document).

Using relative frequency instead (i.e. dividing by the size of the document) solves this problem. It's an example of row-wise normalization, there are many others.


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.