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.scoring.register_scorer#
- julearn.scoring.register_scorer(scorer_name, scorer, overwrite=None)#
Register a scorer, so that it can be accessed by name.
- Parameters:
- scorer_namestr
name of the scorer you want to register
- scorerScorerLike
Callable object that returns a scalar score; greater is better. Will be called using (estimator, X, y).
- overwritebool, optional
decides whether overwrite should be allowed. Options are:
None : overwrite is possible, but warns the user
True : overwrite is possible without any warning
False : overwrite is not possible, error is raised instead
(default is None)
- Raises:
- ValueError
if overwrite is set to False and the scorer already exists.
- Warns:
- UserWarning
if overwrite is set to None and the scorer already exists.
Examples using julearn.scoring.register_scorer
#
Custom Scoring Function for Regression