Scaling to vector unit length
Scaling to the vector unit length involves scaling individual observations (not features) to have a unit norm. Each sample (that is, each row of the data) is rescaled independently of other samples so that its norm equals one. Each row constitutes a feature vector containing the values of every variable for that row. Hence, with this scaling method, we rescale the feature vector.
The norm of a vector is a measure of its magnitude or length in a given space and it can be determined by using the Manhattan (l1) or the Euclidean (l2) distance. The Manhattan distance is given by the sum of the absolute components of the vector:
The Euclidean distance is given by the square root of the square sum of the component of the vector:
Here, and are the values of variables 1, 2, and n for each observation. Scaling to unit norm consists of dividing each feature vector’s value by either l1 or l2, so that after the scaling, the norm of the feature...