Who could I denormalize this?

39 Views Asked by At

I am trying to denormalize the following data:

original = [37.31, 373.02,  57.4 , 216.61,  67.44, 159.21,  77.49, 113.29,
        91.84,  86.03, 123.41,  84.59, 162.15,  96.07, 215.25,  86.03,
       261.17,  70.24, 285.56,  68.81, 337.22,  68.81, 411.84,  93.2 ,
       454.89, 107.55, 496.5 , 255.35, 513.72, 262.53, 552.47, 292.66,
       586.  , 324.23, 586.  , 381.63, 586.  , 449.08, 586.  , 453.38,
       578.3 , 616.97, 518.03, 621.27, 444.84, 624.14, 340.09, 625.58,
       136.32, 625.58,   1.43, 632.75,   7.17, 555.26,   5.74, 414.64]

normalized = [0.0636689 , 0.582844  , 0.0979522 , 0.338453  , 0.115085  ,
       0.248766  , 0.132235  , 0.177016  , 0.156724  , 0.134422  ,
       0.210597  , 0.132172  , 0.276706  , 0.150109  , 0.367321  ,
       0.134422  , 0.445683  , 0.10975   , 0.487304  , 0.107516  ,
       0.575461  , 0.107516  , 0.702799  , 0.145625  , 0.776263  ,
       0.168047  , 0.84727   , 0.398984  , 0.876655  , 0.410203  ,
       0.942782  , 0.457281  , 1.        , 0.506609  , 1.        ,
       0.596297  , 1.        , 0.701688  , 1.        , 0.708406  ,
       0.98686   , 0.964016  , 0.88401   , 0.970734  , 0.759113  ,
       0.975219  , 0.580358  , 0.977469  , 0.232628  , 0.977469  ,
       0.00244027, 0.988672  , 0.0122355 , 0.867594  , 0.00979522,
       0.647875  ]

I don't know the formula used to get the normalized form of the first one, but I tried the following two methods.

By Mode

original_np = np.array(original)
escaled_mode = original_np / mode(original_np)

and I get this result

array([0.06366894, 0.6365529 , 0.09795222, 0.36964164, 0.11508532,
       0.27168942, 0.13223549, 0.19332765, 0.15672355, 0.14680887,
       0.21059727, 0.14435154, 0.27670648, 0.16394198, 0.36732082,
       0.14680887, 0.44568259, 0.11986348, 0.48730375, 0.11742321,
       0.57546075, 0.11742321, 0.70279863, 0.15904437, 0.7762628 ,
       0.18353242, 0.84726962, 0.43575085, 0.87665529, 0.44800341,
       0.94278157, 0.4994198 , 1.        , 0.55329352, 1.        ,
       0.65124573, 1.        , 0.76634812, 1.        , 0.77368601,
       0.98686007, 1.05284983, 0.88401024, 1.06018771, 0.75911263,
       1.06508532, 0.58035836, 1.06754266, 0.23262799, 1.06754266,
       0.00244027, 1.07977816, 0.01223549, 0.94754266, 0.00979522,
       0.70757679])

The result is near an odd position and probably the error is about the way of the language makes the division, but the even numbers are enough far to imagine that this way is not the corrected.

I tried the following formula

(original_np - original_np.min()) / (original_np.max() - original_np.min())

but I get a wrong result

[0.0568333 , 0.58859216, 0.08865552, 0.34084141, 0.1045587 ,
       0.2499208 , 0.12047773, 0.17718431, 0.14320788, 0.13400494,
       0.19321422, 0.13172401, 0.25457771, 0.14990813, 0.3386872 ,
       0.13400494, 0.41142368, 0.10899385, 0.45005702, 0.10672876,
       0.53188557, 0.10672876, 0.65008237, 0.1453621 , 0.71827283,
       0.16809225, 0.78418235, 0.4022049 , 0.81145853, 0.4135779 ,
       0.87283786, 0.4613033 , 0.92594881, 0.51130964, 0.92594881,
       0.60223025, 0.92594881, 0.70906989, 0.92594881, 0.71588101,
       0.91375214, 0.97500475, 0.8182855 , 0.98181588, 0.7023538 ,
       0.98636191, 0.5364316 , 0.98864284, 0.21366344, 0.98864284,
       0.        , 1.        , 0.00909206, 0.87725718, 0.00682697,
       0.65451752]

What is the relation with the mode? or how can I try to get the way of conversion from original, to normalized?

Thanks