generalized_additive_models.Log#

class generalized_additive_models.Log#

Log link: \(g(\mu) = \log(\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 = (0, 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([0.1, 0.5, 0.9, 0.99, 0.999])
>>> Log().link(mu)
array([-2.30258509e+00, -6.93147181e-01, -1.05360516e-01, -1.00503359e-02,
       -1.00050033e-03])
name = 'log'#

Name of the link function

second_derivative(mu)#

Elementwise second derivative of the link function.