Skip to content

Commit

Permalink
fix typo in is_scale_log_needed (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Jan 12, 2021
1 parent bcc280e commit da2c65d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions supervised/preprocessing/preprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit da2c65d

Please sign in to comment.