8000 FIX Shift the points instead of taking abs to preserve blobiness · scikit-learn/scikit-learn@61e98d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 61e98d3

Browse files
committed
FIX Shift the points instead of taking abs to preserve blobiness
1 parent 64cefb8 commit 61e98d3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sklearn/utils/estimator_checks.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,12 @@ def check_estimator_fit_reset(name, Estimator):
15761576
# Some estimators work only on non-negative inputs
15771577
if name in ('AdditiveChi2Sampler', 'SkewedChi2Sampler',
15781578
'NMF', 'MultinomialNB', 'ProjectedGradientNMF'):
1579-
X1 -= X1.min(), X2, X3, X4, X5, X6 = map(np.fabs, (X1, X2, X3, X4, X5, X6))
1579+
X1 -= X1.min()
1580+
X2 -= X2.min()
1581+
X3 -= X3.min()
1582+
X4 -= X4.min()
1583+
X5 -= X5.min()
1584+
X6 -= X6.min()
15801585

15811586
y1, y2, y3, y4, y5, y6 = map(multioutput_estimator_convert_y_2d,
15821587
(name,)*6, (y1, y2, y3, y4, y5, y6))

0 commit comments

Comments
 (0)
0