diff --git a/python-package/lightgbm/sklearn.py b/python-package/lightgbm/sklearn.py index b8f3feb21ab5..47870cfcf050 100644 --- a/python-package/lightgbm/sklearn.py +++ b/python-package/lightgbm/sklearn.py @@ -529,6 +529,9 @@ def _more_tags(self): } } + def __sklearn_is_fitted__(self) -> bool: + return getattr(self, "fitted_", False) + def get_params(self, deep=True): """Get parameters for this estimator.