Fix normalization & standard. columnwise

This commit is contained in:
2021-04-15 00:30:16 +02:00
parent 59f59e6c4f
commit 84795b4c43
4 changed files with 109 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
from experimentation.Sets import Datasets
import numpy as np
dt = Datasets(normalize=False, standardize=False, set_of_files="tanveer")
print("Checking normalized datasets: ")
@@ -7,6 +8,8 @@ for data in dt:
X, y = dt.load(name)
min_value = X.min()
max_value = X.max()
media = np.mean(X)
desv = np.std(X)
resultado = (
"Normalizado"
if min_value <= 1
@@ -15,4 +18,9 @@ for data in dt:
and max_value >= 0
else "No Normalizado"
)
print(f"{name:30s}: {resultado} ")
resultado2 = (
"Standardizado"
if round(media) == 0 and round(desv) == 1
else "No Standardizado"
)
print(f"{name:30s}: {resultado} {resultado2}")