sklearn.utils.estimator_checks.check_estimator
- 
sklearn.utils.estimator_checks.check_estimator(Estimator, generate_only=False)[source]
- 
Check if estimator adheres to scikit-learn conventions. This estimator will run an extensive test-suite for input validation, shapes, etc, making sure that the estimator complies with scikit-learnconventions as detailed in Rolling your own estimator. Additional tests for classifiers, regressors, clustering or transformers will be run if the Estimator class inherits from the corresponding mixin from sklearn.base.Setting generate_only=Truereturns a generator that yields (estimator, check) tuples where the check can be called independently from each other, i.e.check(estimator). This allows all checks to be run independently and report the checks that are failing.scikit-learn provides a pytest specific decorator, parametrize_with_checks, making it easier to test multiple estimators.- Parameters
- 
- 
Estimatorestimator object
- 
Estimator instance to check. Changed in version 0.24: Passing a class was deprecated in version 0.23, and support for classes was removed in 0.24. 
- 
generate_onlybool, default=False
- 
When False, checks are evaluated whencheck_estimatoris called. WhenTrue,check_estimatorreturns a generator that yields (estimator, check) tuples. The check is run by callingcheck(estimator).New in version 0.22. 
 
- 
- Returns
- 
- 
checks_generatorgenerator
- 
Generator that yields (estimator, check) tuples. Returned when generate_only=True.
 
- 
 
    © 2007–2020 The scikit-learn developers
Licensed under the 3-clause BSD License.
    https://scikit-learn.org/0.24/modules/generated/sklearn.utils.estimator_checks.check_estimator.html