|
30 | 30 | )
|
31 | 31 | from .utils.fixes import _IS_32BIT
|
32 | 32 | from .utils.validation import (
|
33 |
| - _check_feature_names, |
34 | 33 | _check_feature_names_in,
|
35 |
| - _check_n_features, |
36 | 34 | _generate_get_feature_names_out,
|
37 | 35 | _is_fitted,
|
38 | 36 | check_array,
|
39 | 37 | check_is_fitted,
|
40 |
| - validate_data, |
41 | 38 | )
|
42 | 39 |
|
43 | 40 |
|
@@ -389,33 +386,6 @@ def __setstate__(self, state):
|
389 | 386 | except AttributeError:
|
390 | 387 | self.__dict__.update(state)
|
391 | 388 |
|
392 |
| - # TODO(1.7): Remove this method |
393 |
| - def _more_tags(self): |
394 |
| - """This code should never be reached since our `get_tags` will fallback on |
395 |
| - `__sklearn_tags__` implemented below. We keep it for backward compatibility. |
396 |
| - It is tested in `test_base_estimator_more_tags` in |
397 |
| - `sklearn/utils/testing/test_tags.py`.""" |
398 |
| - from sklearn.utils._tags import _to_old_tags, default_tags |
399 |
| - |
400 |
| - warnings.warn( |
401 |
| - "The `_more_tags` method is deprecated in 1.6 and will be removed in " |
402 |
| - "1.7. Please implement the `__sklearn_tags__` method.", |
403 |
| - category=DeprecationWarning, |
404 |
| - ) |
405 |
| - return _to_old_tags(default_tags(self)) |
406 |
| - |
407 |
| - # TODO(1.7): Remove this method |
408 |
| - def _get_tags(self): |
409 |
| - from sklearn.utils._tags import _to_old_tags, get_tags |
410 |
| - |
411 |
| - warnings.warn( |
412 |
| - "The `_get_tags` method is deprecated in 1.6 and will be removed in " |
413 |
| - "1.7. Please implement the `__sklearn_tags__` method.", |
414 |
| - category=DeprecationWarning, |
415 |
| - ) |
416 |
| - |
417 |
| - return _to_old_tags(get_tags(self)) |
418 |
| - |
419 | 389 | def __sklearn_tags__(self):
|
420 | 390 | return Tags(
|
421 | 391 | estimator_type=None,
|
@@ -469,35 +439,6 @@ def _repr_mimebundle_(self, **kwargs):
|
469 | 439 | output["text/html"] = estimator_html_repr(self)
|
470 | 440 | return output
|
471 | 441 |
|
472 |
| - # TODO(1.7): Remove this method |
473 |
| - def _validate_data(self, *args, **kwargs): |
474 |
| - warnings.warn( |
475 |
| - "`BaseEstimator._validate_data` is deprecated in 1.6 and will be removed " |
476 |
| - "in 1.7. Use `sklearn.utils.validation.validate_data` instead. This " |
477 |
| - "function becomes public and is part of the scikit-learn developer API.", |
478 |
| - FutureWarning, |
479 |
| - ) |
480 |
| - return validate_data(self, *args, **kwargs) |
481 |
| - |
482 |
| - # TODO(1.7): Remove this method |
483 |
| - def _check_n_features(self, *args, **kwargs): |
484 |
| - warnings.warn( |
485 |
| - "`BaseEstimator._check_n_features` is deprecated in 1.6 and will be " |
486 |
| - "removed in 1.7. Use `sklearn.utils.validation._check_n_features` instead.", |
487 |
| - FutureWarning, |
488 |
| - ) |
489 |
| - _check_n_features(self, *args, **kwargs) |
490 |
| - |
491 |
| - # TODO(1.7): Remove this method |
492 |
| - def _check_feature_names(self, *args, **kwargs): |
493 |
| - warnings.warn( |
494 |
| - "`BaseEstimator._check_feature_names` is deprecated in 1.6 and will be " |
495 |
| - "removed in 1.7. Use `sklearn.utils.validation._check_feature_names` " |
496 |
| - "instead.", |
497 |
| - FutureWarning, |
498 |
| - ) |
499 |
| - _check_feature_names(self, *args, **kwargs) |
500 |
| - |
501 | 442 |
|
502 | 443 | class ClassifierMixin:
|
503 | 444 | """Mixin class for all classifiers in scikit-learn.
|
|
0 commit comments