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.transformers.register_transformer#

julearn.transformers.register_transformer(transformer_name, transformer_cls, overwrite=None)#

Register a transformer to julearn.

This function allows you to add a transformer to julearn. Afterwards, it behaves like every other julearn transformer and can be referred to by name.

Parameters:
transformer_namestr

Name by which the transformer will be referenced by

transformer_clsobject

The class by which the transformer can be initialized from.

overwritebool, optional

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 transformer_name is already registered and overwrite is False.

Warns:
RuntimeWarning

If transformer_name is already registered and overwrite is None.