10000 Pass `check_input` to `_pre_fit` in `ElasticNet` · scikit-learn/scikit-learn@6e47ed6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e47ed6

Browse files
committed
Pass check_input to _pre_fit in ElasticNet
If we want to skip `check_array` calls in `ElasticNet` or `Lasso`, we should disable them in `_pre_fit` as well. Otherwise we will still have to do the same checks that we skipped previously.
1 parent f21ba6f commit 6e47ed6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/linear_model/coordinate_descent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,8 @@ def fit(self, X, y, check_input=True):
717717
should_copy = self.copy_X and not X_copied
718718
X, y, X_offset, y_offset, X_scale, precompute, Xy = \
719719
_pre_fit(X, y, None, self.precompute, self.normalize,
720-
self.fit_intercept, copy=should_copy)
720+
self.fit_intercept, copy=should_copy,
721+
check_input=check_input)
721722
if y.ndim == 1:
722723
y = y[:, np.newaxis]
723724
if Xy is not None and Xy.ndim == 1:

0 commit comments

Comments
 (0)
0