ogboost.LinkFunctions

class ogboost.LinkFunctions[source]

Bases: object

A collection of static methods that implement common link functions for ordinal regression, along with their derivatives and inverse functions. Supported link functions include:

  • Probit: Uses the standard normal cumulative distribution function.

  • Logit: Uses the logistic function.

  • Complementary log-log (cloglog): Uses the complementary log-log transformation.

  • Log-log (loglog): Uses the log-log transformation (opposite of cloglog).

  • Cauchit: Uses the Cauchy cumulative distribution function.

Each link function is provided with: - A forward transformation (e.g., probit, logit, cloglog, loglog, cauchit). - A derivative (e.g., probit_derivative, logit_derivative, cloglog_derivative, etc.). - An inverse function (e.g., probit_inverse, logit_inverse, cloglog_inverse, etc.).

These functions facilitate the mapping between the continuous latent space and the discrete ordinal outcomes in ordinal regression models.

__init__()

Methods

__init__()

cauchit(x)

Cauchit (Cauchy CDF) link function.

cauchit_derivative(x)

Derivative of the Cauchit (Cauchy) link function (Cauchy PDF).

cauchit_inverse(p)

Inverse of the Cauchit (Cauchy) link function (Cauchy quantile function).

cloglog(x)

Complementary log-log (cloglog) link function.

cloglog_derivative(x)

Derivative of the complementary log-log (cloglog) link function.

cloglog_inverse(p)

Inverse of the complementary log-log (cloglog) link function.

logit(x)

Logit (logistic) link function.

logit_derivative(x)

Derivative of the logit link function.

logit_inverse(p)

Inverse of the logit link function.

loglog(x)

Log-log link function.

loglog_derivative(x)

Derivative of the log-log link function.

loglog_inverse(p)

Inverse of the log-log link function.

probit(x)

Probit (normal CDF) link function.

probit_derivative(x)

Derivative of the probit link function (PDF of normal distribution).

probit_inverse(p)

Inverse of the probit link function (normal quantile function).

static probit(x)[source]

Probit (normal CDF) link function.

static probit_derivative(x)[source]

Derivative of the probit link function (PDF of normal distribution).

static probit_inverse(p)[source]

Inverse of the probit link function (normal quantile function).

static logit(x)[source]

Logit (logistic) link function.

static logit_derivative(x)[source]

Derivative of the logit link function.

static logit_inverse(p)[source]

Inverse of the logit link function.

static cloglog(x)[source]

Complementary log-log (cloglog) link function.

static cloglog_derivative(x)[source]

Derivative of the complementary log-log (cloglog) link function.

static cloglog_inverse(p)[source]

Inverse of the complementary log-log (cloglog) link function.

static loglog(x)[source]

Log-log link function. The log-log function is the inverse of the complementary log-log.

static loglog_derivative(x)[source]

Derivative of the log-log link function.

static loglog_inverse(p)[source]

Inverse of the log-log link function.

static cauchit(x)[source]

Cauchit (Cauchy CDF) link function.

static cauchit_derivative(x)[source]

Derivative of the Cauchit (Cauchy) link function (Cauchy PDF).

static cauchit_inverse(p)[source]

Inverse of the Cauchit (Cauchy) link function (Cauchy quantile function).