What scaling method does it use?

I have a matrix X that is 100 * 2000 in size. I want to know what scaling technique is applied to matrix X in the following command and why does it not use the z-score for scaling?

X = X./repmat(sqrt(sum(X.^2)),size(X,1),1); 

      

+3


source to share


1 answer


This scaling comes from linear algebra. This is what we call normalization, creating a unit vector . Assuming each row is an observation and each column is a feature, what happens here is that we go through every observation you have collected and normalize each function value across all observations so that the total length / magnitude is defined functions for all observations is set to 1.

The lower division considers each function and determines the norm or magnitude of the function in all observations. When you find these values, you then take each function for each observation and divide by their respective values.



The reason unit vectors are often used is to describe a point in feature space with respect to a set of basis vectors. Normalizing by generating unit vectors gives you the smallest possible way to represent a single component in object space, and so what is probably happening here is that the observations are now transformed so that each component / element is represented as a set of base vectors. Each base vector is one of the features in the data.

Check out the Wikipedia article on vectors for more details: http://en.wikipedia.org/wiki/Unit_vector

+1


source







All Articles