-
Notifications
You must be signed in to change notification settings - Fork 0
/
Normalizing Data.py
24 lines (17 loc) · 908 Bytes
/
Normalizing Data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import numpy as np
array_2D = np.array([[612104.3, 10862.667, 3281.3333, 7879.3335, 5872.3335],
[6.0315131e+05, 1.6640666e+04, 3.6590000e+03, 1.6201667e+04, 3.4733334e+02],
[6.1428569e+05, 1.1510667e+04, 2.9896667e+03, 1.0653333e+04, 5.6066669e+02],
[606434.7, 16475.666, 2456.3333, 9345. , 5288.3335],
[613883.7, 8480.667, 4699.3335, 4641.6665, 8294.667 ],
[590391. , 25732., 4819., 11242. , 7816.],
[604295.3, 13995., 6378., 7616. , 7711.6665],
[614147.3, 8658.667 , 2509. , 11153.333 , 3528. ],
[574027. , 32155.666 , 13373.333 , 7796. , 10411.667],
[587238. , 24276.334, 12443., 10923.667, 5104.3335]])
maxValue = np.amax(array_2D, axis=0)
minValue = np.amin(array_2D, axis=0)
subt_arr = maxValue - minValue
normalization_value = array_2D - minValue
actual = normalization_value / subt_arr
print(actual)