From da2c65df16d5a0fa28052c4c4b524d84f42b6aab Mon Sep 17 00:00:00 2001 From: Piotrek Date: Tue, 12 Jan 2021 13:15:33 +0100 Subject: [PATCH] fix typo in is_scale_log_needed (#293) --- supervised/preprocessing/preprocessing_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supervised/preprocessing/preprocessing_utils.py b/supervised/preprocessing/preprocessing_utils.py index d4b43b83..7a84b71e 100644 --- a/supervised/preprocessing/preprocessing_utils.py +++ b/supervised/preprocessing/preprocessing_utils.py @@ -83,11 +83,11 @@ def is_scale_needed(x_org): @staticmethod def is_log_scale_needed(x_org): - x = np.array(x_org[~pd.isnull(x_org)]) + x_full = np.array(x_org[~pd.isnull(x_org)]) # first scale on raw data - x = preprocessing.scale(x) + x = preprocessing.scale(x_full) # second scale on log data - x_log = preprocessing.scale(np.log(x - np.min(x) + 1)) + x_log = preprocessing.scale(np.log(x_full - np.min(x_full) + 1)) # the old approach, let's check how new approach will work # original_skew = np.abs(stats.skew(x))