0

I have a two-dimensional array ($569\times30$ double) which should be normalized using this formula:

$x'_{ij} = \dfrac{x_{ij}}{10^h} $

What is the name of this normalization and how can I do that in Matlab?

Edit:

$h$ is depended on array entries, it should be a decimal number to make all data between desired min and max values.

amWhy
  • 209,954

2 Answers2

1

Assuming you have a matrix X with a desired minimum and maximum for the entire matrix, then it is not hard to find upper and lower bounds for h:

ratio_max = max(X)/maximum;
ratio_min = min(X)/minimum;
h_min = log10(ratio_max)
h_max = log10(ratio_max)

Note that depending on your input, h_min might be larger than h_max in which case there is no valid value for which your criteria are met. Also the value might not be finite, in which case this solution might require a manual adjustment.

Now, just pick a value to normalize with, for example somewhere in the middle of the range and perform the operation:

h = (h_min + h_max)/2;
X_normalized = X / 10^h;
Dennis Jaheruddin
  • 925
  • 1
  • 6
  • 20
  • What is the name of this normalization? has Matlab any implementation for this normalization. – Mohammad Ali Akbari Nov 27 '12 at 13:50
  • 1
    Unfortunately I can't say that I heard about this before, given this I wonder whether it even has a name. As for an implementation, the code I have provided should allow you to implement it directly. – Dennis Jaheruddin Nov 27 '12 at 13:53
  • I would just call it "normalization": that's the name for dividing all numbers by a certain value such that a given maximum is not exceeded. What I don't see is how at the same time you can make all numbers greater than a given minimum. The two conditions cannot be simultaneously met in the general case – Luis Mendo Nov 04 '13 at 21:26
0

Final m-file is:

function [normalized] = p1_normalize_h(dataset)
dataset_max = max(max(dataset));
dataset_min = min(min(dataset));
h = max(abs(dataset_min), abs(dataset_max));
h = log10(h);
normalized = dataset / 10^h;