Skip to content

docs: describe mu as location parameter in stats/base/dists/logistic/mgf#12874

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-stats-base-dists-logistic-2026-06-14
Draft

docs: describe mu as location parameter in stats/base/dists/logistic/mgf#12874
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-stats-base-dists-logistic-2026-06-14

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request normalizes the JSDoc mu description in stats/base/dists/logistic/mgf to match the namespace-wide convention used by the other 13 native-binding packages: "location parameter" instead of "mean".

Namespace summary

  • Members analyzed: 15 (cdf, ctor, entropy, kurtosis, logcdf, logpdf, mean, median, mgf, mode, pdf, quantile, skewness, stdev, variance).
  • Autogenerated members excluded from the vote: 0.
  • Features with a clear majority (≥75%) and an applicable correction: 1.
  • Features without a clear majority (excluded from drift analysis): the presence of lib/factory.js (a 6-of-15 semantic split between factory-producing kernels and direct-arithmetic ones).

Per outlier package

stats/base/dists/logistic/mgf

@param {number} mu and the surrounding JSDoc summary referred to mu as "mean" in lib/main.js, lib/factory.js, and lib/native.js, and the matching block comments in src/main.c and include/stdlib/stats/base/dists/logistic/mgf.h carried the same wording. The 13 sibling packages under stats/base/dists/logistic/ describe mu as the "location parameter" (13/14 = 93% conformance among the native-binding members), and the same mgf package's README.md, docs/types/index.d.ts, and docs/repl.txt already use "location parameter" — only the lib/ and src/ doc comments lagged. Sibling location-family mgf packages (laplace/mgf, gumbel/mgf) follow the same convention; normal/mgf is the one legitimate "mean" user, because for the normal distribution mu IS canonically the mean, which is not the case for the logistic family.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

  • Structural feature extraction over all 15 members (file trees, package.json shape, README headings, manifest shape, test/benchmark/example file naming).
  • Semantic feature extraction per package (public signature, validation prologue, error construction, JSDoc shape, dependencies).
  • Three-agent drift validation (semantic-review, cross-reference, structural-review) ran in parallel on the mgf candidate; all three returned confirmed-drift.

Deliberately excluded from this PR:

  • ctor is the canonical "missing native-binding artifacts" outlier in this namespace (no binding.gyp, src/, Julia fixtures, etc.) — intentional, since ctor is a JS-only distribution-class constructor.
  • stdev uses Python rather than Julia test fixtures (test/fixtures/python/ vs the 13-of-14 majority test/fixtures/julia/). Marked needs-human: the test file imports the Python fixture, so migrating would require regenerating fixtures and rewriting the test — out of scope for a drift-correction PR.
  • mean/median/mode use var <pkg> = require( './main.js' ) rather than the 12-of-15 majority var main = .... The named-variable form is the ecosystem-wide convention across ≥27 sibling distributions, so this is not local drift.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code as part of the namespace drift-detection routine. A randomly selected namespace (stats/base/dists/logistic) was feature-extracted across all 15 members; majority patterns were computed at 75% conformance; outliers were gated through a three-agent validation pass before any patch was applied. A human maintainer should verify the patch before promoting this PR out of draft.


@stdlib-js/reviewers


Generated by Claude Code

…ic/mgf`

The JSDoc summary and `mu` `@param` description in `lib/main.js`,
`lib/factory.js`, and `lib/native.js`, plus the matching block
comments in `src/main.c` and `include/stdlib/stats/base/dists/logistic/mgf.h`,
referred to `mu` as "mean". The 13 sibling packages under
`stats/base/dists/logistic/` describe `mu` as the "location parameter"
(13/14 = 93% conformance among the native-binding members), and the
mgf package's own README, TypeScript declarations, and REPL
documentation already use "location parameter". Normalize the
remaining lib/ and src/ doc comments to match.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Jun 14, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/logistic/mgf $\\color{red}304/306$
$\\color{green}+99.35\\%$
$\\color{red}19/20$
$\\color{green}+95.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{red}304/306$
$\\color{green}+99.35\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants