graph LR
BaseEstimator["BaseEstimator"]
ClassifierMixin["ClassifierMixin"]
RegressorMixin["RegressorMixin"]
TransformerMixin["TransformerMixin"]
clone["clone"]
clone -- "is implemented by" --> BaseEstimator
ClassifierMixin -- "declares tags" --> ClassifierMixin
RegressorMixin -- "declares tags" --> RegressorMixin
TransformerMixin -- "declares tags" --> TransformerMixin
clone -- "uses" --> clone
The Core Estimators and Transformers component in scikit-learn defines the foundational classes and interfaces for all estimators and transformers. It ensures a consistent API for model training, prediction, and data transformation across the library. The BaseEstimator class provides common methods for parameter management, validation, and cloning, while mixin classes like TransformerMixin, ClassifierMixin, and RegressorMixin extend this base functionality for specific estimator types. This unified foundation promotes code reuse, simplifies model development, and ensures interoperability between different scikit-learn components.
Base class for all estimators in scikit-learn. It provides core functionalities like parameter management (get_params, set_params), validation (_validate_params), and cloning (sklearn_clone). It serves as a foundation for all estimators, ensuring consistency in their interfaces and behaviors. Related Classes/Methods:
sklearn.base.BaseEstimator(156:473)sklearn.base.BaseEstimator:get_params(233:255)sklearn.base.BaseEstimator:_get_params_html(257:313)sklearn.base.BaseEstimator:set_params(315:357)sklearn.base.BaseEstimator:__sklearn_clone__(359:360)sklearn.base.BaseEstimator:_validate_params(461:473)sklearn.base.BaseEstimator:_get_param_names(203:231)
Mixin class for all classifier estimators in scikit-learn. It provides a default implementation for the __sklearn_tags__ method, which is used to declare the estimator's capabilities and requirements. It interacts with BaseEstimator by extending its functionality with classifier-specific tags.
Related Classes/Methods:
Mixin class for all regressor estimators in scikit-learn. It provides a default implementation for the __sklearn_tags__ method, which is used to declare the estimator's capabilities and requirements. It interacts with BaseEstimator by extending its functionality with regressor-specific tags.
Related Classes/Methods:
Mixin class for all transformer estimators in scikit-learn. It provides a default implementation for the fit_transform method, which chains the fit and transform methods. It interacts with BaseEstimator by extending its functionality with transformer-specific methods.
Related Classes/Methods:
A function in sklearn.base that creates a deep copy of an estimator. It uses _clone_parametrized to handle the cloning process, ensuring that all parameters are properly copied. It is used by BaseEstimator to provide cloning functionality.
Related Classes/Methods: