Skip to content
This repository was archived by the owner on Jun 26, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion delira/models/backends/sklearn/abstract_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,26 @@ class SklearnEstimator(AbstractNetwork):
compatibility
"""

def __init__(self, module: BaseEstimator):
def __init__(self, module: BaseEstimator = None, module_cls=None,
**module_kwargs):
"""

Parameters
----------
module : :class:`sklearn.base.BaseEstimator`
the module to wrap
module_cls : class
the class to create the module from; will only be used,
if :param:`module` is None
**module_kwargs :
the keyword arguments to for creating the module with
:param:`module_cls`

"""

super().__init__()
if module is None:
module = module_cls(**module_kwargs)

self.module = module

Expand Down
Loading