You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
L inf normalizer should take the maximum of the absolute value before dividing the array.
Steps/Code to Reproduce
fromsklearn.preprocessingimportNormalizerimportnumpyasnpa=np.array([[1]])
normalizer=Normalizer(norm='max')
b=normalizer.fit_transform(a)
c=normalizer.fit_transform(-a)
# they should be differentprint(b, c)
Expected Results
The normalized version of a vector with only negative elements should remain negative. It should take maximum absolute value, which is positive, hence remains negative.
Actual Results
The normalization applied to a positive-only vector and to a negative-only vector returns the same results.