generalized_additive_models.Logit#
- class generalized_additive_models.Logit(low=0, high=1)#
Logit link: \(g(\mu) = \log(\mu / (1 - \mu))\)
- __init__(low=0, high=1)#
Methods
__init__([low, high])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.
Elementwise second derivative of the link function.
set_params(**params)Set the parameters of this estimator.
Attributes
- derivative(mu)#
Elementwise first derivative of the link function.
- domain = (0, 1)#
Domain of the link function
- 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.
Examples
>>> mu = np.array([0.1, 0.5, 0.9, 0.99, 0.999]) >>> Logit().link(mu) array([-2.19722458, 0. , 2.19722458, 4.59511985, 6.90675478])
- name = 'logit'#
Name of the link function
- second_derivative(mu)#
Elementwise second derivative of the link function.