How to Normalize variables?

3 visualizaciones (últimos 30 días)
Matt Learner
Matt Learner el 1 de Mzo. de 2012
Hi, I have an issue regarding normalization. I have two state variables x1(range is 0.015<=x1<=0.03) and x2(range is 0<=x2<=1100) which form the state and I have discretized each of the state variables into 8 levels so that I can make 64(=8^2) state grids and stored it. Suppose if I obtained a resulting state as (x1,x2) = (0.03,800) and I have to select the nearest stored state grid point(out of 64 grids) I can use the simple method of Euclidean Norm which finds the shortest distance Euclidean Norm
|dist| = sqrt( (x1 - x1 value from the grid)^2 + (x2 - x2 from the grid)^2 )
Now, the actual problem is, as both x1 and x2 affect the state equally and the range of x2 is bigger (range is 0<=x2<=1100) than that of x1 (range is 0.015<=x1<=0.03), if I directly calculate the distance, x2 will dominate and x1 won't make much difference. So I understood that I need to normalize them. When I normalize them, I'd like to normalize them so that their effect is almost identical. I have least knowledge about normalization. Can anyone please assist me in doing that? Also is there any factors to consider while normalizing such as out of range values, etc
Thanks in advance for your time and consideration

Respuestas (1)

Laurens Bakker
Laurens Bakker el 7 de Mzo. de 2012
Hi Matt,
Normalisation just means: "change the numbers so that both range from 0 to 1". You can do that by subtracting the minimum (then both ranges start at 0), and then dividing by the maximum (then the ranges end at 1).
As a second thought, though, why use euclidean distance at all? If for example the nearest level for x1 is level 4, and the nearest level for x2 is level 5, then the data point should fall into state (4,5).
Cheers,
Laurens

Categorías

Más información sobre Bar Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by