generalized_additive_models.Identity#

class generalized_additive_models.Identity#

Identity link: \(g(\mu) = \mu\)

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

derivative(mu)

Elementwise first derivative of the link function.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

inverse_link(linear_prediction)

Map from the linear space to the expected value \(\mu\).

link(mu)

Map from the expected value \(\mu\) to the unbounded linear space.

second_derivative(mu)

Elementwise second derivative of the link function.

set_params(**params)

Set the parameters of this estimator.

Attributes

domain

Domain of the link function

name

Name of the link function

derivative(mu)#

Elementwise first derivative of the link function.

domain = (-inf, inf)#

Domain of the link function

Map from the linear space to the expected value \(\mu\).

Map from the expected value \(\mu\) to the unbounded linear space.

Examples

>>> mu = np.array([-1, 0, 1])
>>> Identity().link(mu)
array([-1,  0,  1])
name = 'identity'#

Name of the link function

second_derivative(mu)#

Elementwise second derivative of the link function.