Skip to content

Commit 46e8ca3

Browse files
MAINT: Don't make inapplicable conditions block oneDAL usage in LogisticRegression (#2513)
* remove unnecessary conditions * update support table * Update sklearnex/linear_model/logistic_regression.py Co-authored-by: Ian Faust <[email protected]> --------- Co-authored-by: Ian Faust <[email protected]>
1 parent 96bc915 commit 46e8ca3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

doc/sources/algorithms.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,8 @@ Classification
313313
- ``penalty`` != `'l2'`
314314
- ``dual`` = `True`
315315
- ``intercept_scaling`` != `1`
316-
- ``multi_class`` != `'multinomial'`
317316
- ``warm_start`` = `True`
318-
- ``l1_ratio`` != `None`
317+
- ``l1_ratio`` != 0 and ``l1_ratio`` != ``None``
319318
- Only binary classification is supported
320319
- No limitations
321320

sklearnex/linear_model/logistic_regression.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,11 @@ def _onedal_gpu_fit_supported(self, method_name, *data):
208208
),
209209
(self.class_weight is None, "Class weight is not supported"),
210210
(self.solver == "newton-cg", "Only newton-cg solver is supported."),
211+
(self.warm_start == False, "Warm start is not supported."),
211212
(
212-
self.multi_class != "multinomial",
213-
"multi_class parameter is not supported.",
213+
not self.l1_ratio,
214+
"l1 ratio is not supported.",
214215
),
215-
(self.warm_start == False, "Warm start is not supported."),
216-
(self.l1_ratio is None, "l1 ratio is not supported."),
217216
(sample_weight is None, "Sample weight is not supported."),
218217
(
219218
target_type == "binary",

0 commit comments

Comments
 (0)