pyGAM
0.5.5

Contents:

  • Getting Started with pyGAM
  • API
    • Generalized Additive Model Classes
    • Helper Classes and Functions
      • Distributions
      • Links
      • Callbacks
      • Penalties
pyGAM
  • Docs »
  • API »
  • Links
  • View page source

Links¶

class pygam.links.Link(name=None)¶

Bases: pygam.core.Core

class pygam.links.IdentityLink¶

Bases: pygam.links.Link

gradient(mu, dist)¶

derivative of the link function wrt mu

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

grad

Return type:

np.array of length n

link(mu, dist)¶

glm link function this is useful for going from mu to the linear prediction

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

lp

Return type:

np.array of length n

mu(lp, dist)¶

glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu

Parameters:
  • lp (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

mu

Return type:

np.array of length n

class pygam.links.InvSquaredLink¶

Bases: pygam.links.Link

gradient(mu, dist)¶

derivative of the link function wrt mu

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

grad

Return type:

np.array of length n

link(mu, dist)¶

glm link function this is useful for going from mu to the linear prediction

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

lp

Return type:

np.array of length n

mu(lp, dist)¶

glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu

Parameters:
  • lp (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

mu

Return type:

np.array of length n

class pygam.links.LogitLink¶

Bases: pygam.links.Link

gradient(mu, dist)¶

derivative of the link function wrt mu

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

grad

Return type:

np.array of length n

link(mu, dist)¶

glm link function this is useful for going from mu to the linear prediction

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

lp

Return type:

np.array of length n

mu(lp, dist)¶

glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu

Parameters:
  • lp (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

mu

Return type:

np.array of length n

class pygam.links.LogLink¶

Bases: pygam.links.Link

gradient(mu, dist)¶

derivative of the link function wrt mu

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

grad

Return type:

np.array of length n

link(mu, dist)¶

glm link function this is useful for going from mu to the linear prediction

Parameters:
  • mu (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

lp

Return type:

np.array of length n

mu(lp, dist)¶

glm mean function, ie inverse of link function this is useful for going from the linear prediction to mu

Parameters:
  • lp (array-like of legth n) –
  • dist (Distribution instance) –
Returns:

mu

Return type:

np.array of length n

Next Previous

© Copyright 2018, Daniel Servén and Charlie Brummitt.

Built with Sphinx using a theme provided by Read the Docs.