14
14
from ..utils .validation import check_is_fitted , _check_sample_weight
15
15
from ._base import LinearRegression
16
16
from ..utils .validation import has_fit_parameter
17
- from ..utils ._param_validation import Interval , Options , StrOptions , HasMethods , Hidden
17
+ from ..utils ._param_validation import Interval , Options , StrOptions , HasMethods
18
18
from ..utils ._param_validation import RealNotInt
19
19
from ..exceptions import ConvergenceWarning
20
20
@@ -161,13 +161,6 @@ class RANSACRegressor(
161
161
Pass an int for reproducible output across multiple function calls.
162
162
See :term:`Glossary <random_state>`.
163
163
164
- base_estimator : object, default="deprecated"
165
- Use `estimator` instead.
166
-
167
- .. deprecated:: 1.1
168
- `base_estimator` is deprecated and will be removed in 1.3.
169
- Use `estimator` instead.
170
-
171
164
Attributes
172
165
----------
173
166
estimator_ : object
@@ -259,11 +252,6 @@ class RANSACRegressor(
259
252
"stop_probability" : [Interval (Real , 0 , 1 , closed = "both" )],
260
253
"loss" : [StrOptions ({"absolute_error" , "squared_error" }), callable ],
261
254
"random_state" : ["random_state" ],
262
- "base_estimator" : [
263
- HasMethods (["fit" , "score" , "predict" ]),
264
- Hidden (StrOptions ({"deprecated" })),
265
- None ,
266
- ],
267
255
}
268
256
269
257
def __init__ (
@@ -281,7 +269,6 @@ def __init__(
281
269
stop_probability = 0.99 ,
282
270
loss = "absolute_error" ,
283
271
random_state = None ,
284
- base_estimator = "deprecated" ,
285
272
):
286
273
self .estimator = estimator
287
274
self .min_samples = min_samples
@@ -295,7 +282,6 @@ def __init__(
295
282
self .stop_probability = stop_probability
296
283
self .random_state = random_state
297
284
self .loss = loss
298
- self .base_estimator = base_estimator
299
285
300
286
def fit (self , X , y , sample_weight = None ):
301
287
"""Fit estimator using RANSAC algorithm.
@@ -339,16 +325,6 @@ def fit(self, X, y, sample_weight=None):
339
325
)
340
326
check_consistent_length (X , y )
341
327
342
- if self .base_estimator != "deprecated" :
343
- warnings .warn (
344
- (
345
- "`base_estimator` was renamed to `estimator` in version 1.1 and "
346
- "will be removed in 1.3."
347
- ),
348
- FutureWarning ,
349
- )
350
- self .estimator = self .base_estimator
351
-
352
328
if self .estimator is not None :
353
329
estimator = clone (self .estimator )
354
330
else :
0 commit comments