gamlss-core 0.1.0

Core type-driven abstractions for GAMLSS modeling
Documentation
  • Coverage
  • 100%
    198 out of 198 items documented0 out of 130 items with examples
  • Size
  • Source code size: 83.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • hexqnt/gamlss
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hexqnt

gamlss

CI crates.iodocs.rs

Type-driven Rust crates for GAMLSS-style modeling.

Status: This crate is an early MVP. It is published to make the project available and reserve the crate names, but it is not intended for production use yet. The public API, internals, numerical behavior, and crate structure may change substantially while the library is being developed.

Структура crate-ов

Основная точка входа для пользователей — crate gamlss:

[dependencies]
gamlss = "0.1"

Workspace также публикует несколько низкоуровневых crate-ов:

  • gamlss-core — type-driven ядро: links, parameter blocks, objectives и compiled models.
  • gamlss-family — распределения, likelihoods, scores и вспомогательные функции.
  • gamlss-spline — spline bases, penalties и spline metadata.
  • gamlss-formula — optional formula/builder layer, который компилируется в typed models.

Эти crate-ы опубликованы отдельно, чтобы сохранить явные границы модулей и легкие зависимости, но они не являются основной пользовательской поверхностью. В обычном случае достаточно зависеть от gamlss; остальные crate-ы будут подключены транзитивно.

Общая форма GAMLSS

В общем виде GAMLSS задает условное распределение отклика через набор параметров выбранного семейства:

$$ Y_i \mid x_i \sim D(\theta_{i1}, \ldots, \theta_{iK}), $$

где D(...) — выбранное параметрическое распределение, а каждый параметр моделируется своим link-function и аддитивным предиктором:

$$ g_k(\theta_{ik}) = \eta_{ik} = X_{k,i}\beta_k + \sum_j f_{k,j}(x_i), \qquad k = 1,\ldots,K. $$

Классическое соглашение gamlss часто записывает до четырех параметров как mu, sigma, nu и tau:

$$ (\theta_{i1}, \theta_{i2}, \theta_{i3}, \theta_{i4}) = (\mu_i, \sigma_i, \nu_i, \tau_i), $$

$$ Y_i \mid x_i \sim D(\mu_i, \sigma_i, \nu_i, \tau_i). $$

Здесь mu, sigma, nu и tau обычно отвечают за положение, масштаб, асимметрию и форму распределения. Не каждое семейство использует все четыре параметра: например, двухпараметрическое распределение может иметь только D(mu_i, sigma_i), а другие семейства могут задавать свое число и смысл параметров.