Skip to content

feat: add LogLogisticDistribution (Fisk) — log-space Logistic pipeline, survival analysis (depends on #54) #59

Description

@OldCrow

Summary

Add the Log-Logistic (Fisk) distribution. Once LogisticDistribution (issue #54) is implemented, Log-Logistic is a log-space transformation of Logistic — the batch path reduces to vector_log + the Logistic SIMD pipeline.

Parametrisation

Shape α > 0, scale β > 0. Scipy: fisk. Support: x > 0.

z       = log(x/β) · α   (i.e. α · (log(x) - log(β)))
CDF(x)  = 1 / (1 + exp(-z))    = CDF_Logistic(z; μ=0, s=1)
PDF(x)  = (α/β) · (x/β)^(α-1) / (1 + (x/β)^α)²
log PDF = log(α) - log(β) + (α-1)·log(x/β) - 2·log(1 + (x/β)^α)

Batch CDF: vector_log(x)scalar_multiply(α)scalar_add(-α·log(β)) → Logistic CDF pipeline (vector_exp + arithmetic).

Properties

  • Median = β
  • Mean = β·π/(α·sin(π/α)) for α > 1; undefined for α ≤ 1
  • Variance: closed form for α > 2
  • Skewness: right-skewed for all α
  • MLE: α estimated via Newton–Raphson on the log-likelihood profile score; β̂ = sample median
  • Use cases: survival analysis (heavier tail than Weibull, lighter than Pareto), income distributions (Fisk 1961), hydrology

Implementation notes

  • Prerequisite: issue feat: add LogisticDistribution and GumbelDistribution — closed-form SIMD via vector_exp #54 (LogisticDistribution). The batch CDF implementation reuses the Logistic CDF batch path after a log-transform pre-pass.
  • The alternative direct formula CDF(x) = (x/β)^α / (1 + (x/β)^α) avoids a log+exp but loses precision for small x; the logistic form is numerically superior.
  • Dispatch thresholds: NEVER initially. Expect thresholds similar to LogNormal (log + exp chain).
  • is_delegation_wrapper = false — the implementation uses Logistic primitives but has its own parameterisation and moments.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions