Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the What you really need to know section for the big picture.
julearn.models.register_model#
- julearn.models.register_model(model_name, classification_cls=None, regression_cls=None, overwrite=None)#
Register a model to julearn.
This function allows you to add a model or models for different problem types to julearn. Afterwards, it behaves like every other julearn model and can be referred to by name. E.g. you can use inside of run_cross_validation using model=model_name.
- Parameters:
- model_namestr
Name by which model will be referenced by
- classification_clsModelLike
The class which will be used for classification.
- regression_clsModelLike
The class which will be used for regression.
- overwritebool, optional
decides whether overwrite should be allowed
Options are:
None : overwrite is possible, but warns the user (default).
True : overwrite is possible without any warning.
False : overwrite is not possible, error is raised instead.
- Raises:
- ValueError
If model_name is already registered and overwrite is False.
- Warns:
- RuntimeWarning
If model_name is already registered and overwrite is None.