"python-package/vscode:/vscode.git/clone" did not exist on "12a963342e51ce0239abca66e94bb33c4cdb9b90"
Unverified Commit 4b140bcc authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python][sklearn] add `__sklearn_is_fitted__()` method to be better compatible...

[python][sklearn] add `__sklearn_is_fitted__()` method to be better compatible with scikit-learn API (#4636)
parent 01aa295a
...@@ -529,6 +529,9 @@ class LGBMModel(_LGBMModelBase): ...@@ -529,6 +529,9 @@ class LGBMModel(_LGBMModelBase):
} }
} }
def __sklearn_is_fitted__(self) -> bool:
return getattr(self, "fitted_", False)
def get_params(self, deep=True): def get_params(self, deep=True):
"""Get parameters for this estimator. """Get parameters for this estimator.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment