Skip to content

Instantly share code, notes, and snippets.

@MaxHalford
Created July 17, 2020 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxHalford/dc23341d1566031056c8e2a59933fe42 to your computer and use it in GitHub Desktop.
Save MaxHalford/dc23341d1566031056c8e2a59933fe42 to your computer and use it in GitHub Desktop.
sklearn partial_fit support
import importlib
import inspect
def worthy(obj):
return inspect.isclass(obj) and hasattr(obj, 'partial_fit')
for _, submodule in inspect.getmembers(importlib.import_module('sklearn'), inspect.ismodule):
for _, obj in inspect.getmembers(submodule, worthy):
print(submodule.__name__, obj.__name__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment