IdentityLink#
- class pygam.links.IdentityLink[source]#
Bases:
LinkIdentity Link
- Parameters:
Methods
get_params([deep])Returns a dict of all of the object's user-facing parameters.
gradient(mu, dist)Derivative of the link function wrt mu.
link(mu, dist)Glm link function this is useful for going from mu to the linear prediction.
mu(lp, dist)Glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu.
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
- gradient(mu, dist)[source]#
Derivative of the link function wrt mu.
- Parameters:
- muarray-like of length n
- distDistribution instance
- Returns:
- gradnp.array of length n
- link(mu, dist)[source]#
Glm link function this is useful for going from mu to the linear prediction.
- Parameters:
- muarray-like of length n
- distDistribution instance
- Returns:
- lpnp.array of length n
- mu(lp, dist)[source]#
Glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu.
- Parameters:
- lparray-like of length n
- distDistribution instance
- Returns:
- munp.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