Accuracy#

class pygam.callbacks.Accuracy[source]#

Bases: CallBack

Accuracy CallBack

Useful for capturing the accuracy of a model on training data at each iteration

Parameters:

Methods

get_params([deep])

Returns a dict of all of the object's user-facing parameters.

on_loop_start(y, mu)

Runs the method at start of each optimization loop.

set_params([deep, force])

Sets an object's parameters.

get_params(deep=False)[source]#

Returns a dict of all of the object’s user-facing parameters.

Parameters:
deepboolean, default: False

when True, also gets non-user-facing parameters

Returns:
dict
on_loop_start(y, mu)[source]#

Runs the method at start of each optimization loop.

Parameters:
yarray-like of length n

target data

muarray-like of length n

expected value data

Returns:
accuracynp.array of length n
set_params(deep=False, force=False, **parameters)[source]#

Sets an object’s parameters.

Parameters:
deepboolean, default: False

when True, also sets non-user-facing parameters

forceboolean, default: False

when True, also sets parameters that the object does not already have

**parametersparameters to set
Returns:
self