Skip to main content
Ctrl+K

pyGAM

  • Quick Start
  • A Tour of pyGAM
  • API Reference
  • PyPI
  • GitHub
  • Quick Start
  • A Tour of pyGAM
  • API Reference
  • PyPI
  • GitHub

Section Navigation

  • pygam.pygam
    • ExpectileGAM
    • GAM
    • GammaGAM
    • InvGaussGAM
    • LinearGAM
    • LogisticGAM
    • PoissonGAM
  • pygam.terms
    • f
    • l
    • s
    • te
    • FactorTerm
    • Intercept
    • LinearTerm
    • MetaTermMixin
    • SplineTerm
    • TensorTerm
    • Term
    • TermList
  • pygam.distributions
    • divide_weights
    • multiply_weights
    • BinomialDist
    • Distribution
    • GammaDist
    • InvGaussDist
    • NormalDist
    • PoissonDist
  • pygam.links
    • IdentityLink
    • InvSquaredLink
    • InverseLink
    • Link
    • LogLink
    • LogitLink
  • pygam.penalties
    • concave
    • convex
    • convexity_
    • derivative
    • l2
    • monotonic_dec
    • monotonic_inc
    • monotonicity_
    • none
    • periodic
    • sparse_diff
    • wrap_penalty
  • pygam.callbacks
    • validate_callback
    • validate_callback_data
    • Accuracy
    • CallBack
    • Coef
    • Deviance
    • Diffs
  • API Reference
  • pygam.links
  • IdentityLink

IdentityLink#

class pygam.links.IdentityLink[source]#

Bases: Link

Identity 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

previous

pygam.links

next

InvSquaredLink

On this page
  • IdentityLink
    • IdentityLink.get_params()
    • IdentityLink.gradient()
    • IdentityLink.link()
    • IdentityLink.mu()
    • IdentityLink.set_params()
Edit on GitHub

This Page

  • Show Source

© Copyright 2025 pyGAM Developers.

🌿🐛 Found a bug? Have an idea? Please submit it