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))