LogitLink<T>

Models & Types · AiDotNet.LinkFunctions

Logit link function: g(μ) = log(μ/(1-μ)).

Implements: ILinkFunction<T>

For Beginners

Use this for binary classification (logistic regression). It ensures your predictions are valid probabilities between 0 and 1.

The logit function is the log-odds:

  • logit(0.5) = 0 (50-50 odds)
  • logit(0.9) = 2.2 (9:1 odds)
  • logit(0.1) = -2.2 (1:9 odds)

The inverse logit (sigmoid) converts back:

  • sigmoid(0) = 0.5
  • sigmoid(2.2) ≈ 0.9
  • sigmoid(-2.2) ≈ 0.1

How It Works

The logit link is the canonical link for the Binomial distribution. It maps probabilities from (0,1) to (-∞,∞).

Constructors

Constructor Summary
LogitLink()

Properties

Property Summary
bool IsCanonical { get; }
string Name { get; }

Methods

Method Summary
T InverseLink(T eta)
T InverseLinkDerivative(T eta)
T Link(T mu)
T LinkDerivative(T mu)
T Variance(T mu)