Open Markopolo141 opened 11 months ago
calling standardize() does not properly handle columns which are constant
import numpy as np Z = np.array([[0,1,2,5],[1,2,3,5],[3,1,2,5]]) print(standardize(Z))
outputs a column of -5.
Insert below line 130 in scaling.py
parameters["avgs"][c] = 0.0
should have column of zeros instead of -5.
has a column of -5s when it should have column of zero
MLxtend 0.22.0 Linux-5.19.0-46-generic-x86_64-with-glibc2.35 Python 3.9.17 (main, Jun 6 2023, 20:11:21) [GCC 11.3.0] Scikit-learn 1.2.2 NumPy 1.23.5 SciPy 1.10.0
Describe the bug
calling standardize() does not properly handle columns which are constant
Steps/Code to Reproduce
outputs a column of -5.
Suggested Fix
Insert below line 130 in scaling.py
Expected Results
should have column of zeros instead of -5.
Actual Results
has a column of -5s when it should have column of zero
Versions
MLxtend 0.22.0 Linux-5.19.0-46-generic-x86_64-with-glibc2.35 Python 3.9.17 (main, Jun 6 2023, 20:11:21) [GCC 11.3.0] Scikit-learn 1.2.2 NumPy 1.23.5 SciPy 1.10.0