10000
File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,12 @@ Changelog
280
280
in :class: `linear_model.LogisticRegression `, and will be removed in version 1.4.
281
281
Use `None ` instead. :pr: `23877 ` by :user: `Zhehao Liu <MaxwellLZH> `.
282
282
283
+ - |Fix | :class: `linear_model.SGDOneClassSVM ` no longer performs parameter
284
+ validation in the constructor. All validation is now handled in `fit() ` and
285
+ `partial_fit() `.
286
+ :pr: `24433 ` by :user: `Yogendrasingh <iofall> `, :user: `Arisa Y. <arisayosh> `
287
+ and :user: `Tim Head <betatim> `.
288
+
283
289
:mod: `sklearn.manifold `
284
290
.......................
285
291
Original file line number Diff line number Diff line change @@ -2160,13 +2160,10 @@ def __init__(
2160
2160
warm_start = False ,
2161
2161
average = False ,
2162
2162
):
2163
-
2164
- alpha = nu / 2
2165
2163
self .nu = nu
2166
2164
super (SGDOneClassSVM , self ).__init__ (
2167
2165
loss = "hinge" ,
2168
2166
penalty = "l2" ,
2169
- alpha = alpha ,
2170
2167
C = 1.0 ,
2171
2168
l1_ratio = 0 ,
2172
2169
fit_intercept = fit_intercept ,
Original file line number Diff line number Diff line change @@ -431,15 +431,9 @@ def test_transformers_get_feature_names_out(transformer):
431
431
)
432
432
433
433
434
- VALIDATE_ESTIMATOR_INIT = [
435
- "SGDOneClassSVM" ,
436
- ]
437
- VALIDATE_ESTIMATOR_INIT = set (VALIDATE_ESTIMATOR_INIT )
438
-
439
-
440
434
@pytest .mark .parametrize (
441
435
"Estimator" ,
442
- [est for name , est in all_estimators () if name not in VALIDATE_ESTIMATOR_INIT ],
436
+ [est for name , est in all_estimators ()],
443
437
)
444
438
def test_estimators_do_not_raise_errors_in_init_or_set_params (Estimator ):
445
439
"""Check that init or set_param does not raise errors."""
You can’t perform that action at this time.
0 commit comments