docs: fix parameter descriptions in stats/base/dists/lognormal#11829
Merged
docs: fix parameter descriptions in stats/base/dists/lognormal#11829
stats/base/dists/lognormal#11829Conversation
…tions Aligns logcdf parameter terminology with the 13 sibling packages (cdf, pdf, logpdf, quantile, mean, median, mode, entropy, kurtosis, skewness, stdev, variance, ctor) which uniformly describe `mu` as the location parameter and `sigma` as the scale parameter of the underlying normal distribution. Drift items corrected (logcdf was the lone outlier): - JSDoc / TS-decl / repl.txt / README descriptions: `mu - mean` -> `mu - location parameter` (13/14 = 93% of siblings). - JSDoc / TS-decl / repl.txt / README descriptions: `sigma - standard deviation` -> `sigma - scale parameter` (13/14 = 93% of siblings). - Function-description prose: "with mean \`mu\` and standard deviation \`sigma\`" -> "with location parameter \`mu\` and scale parameter \`sigma\`" (13/14 = 93% of siblings); also added the matching prose to the factory.js JSDoc summary, which previously lacked any parameter description. - Example-comment label: "Negative standard deviation" -> "Negative scale parameter" (matches sibling phrasing for the sigma < 0 example). The mu/sigma terms are the location/scale of the underlying normal, not the mean/stddev of the lognormal, so the prior wording was mathematically misleading. JSDoc TYPE annotations and behavior are intentionally unchanged: factory.js legitimately accepts sigma === 0 (delegates to the degenerate distribution), and main.js is exercised by test.logcdf.js with sigma === 0, so NonNegativeNumber is preserved for both.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
stats/base/dists/lognormal with namespace majority patternsstats/base/dists/lognormal
kgryte
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request aligns
stats/base/dists/lognormal/logcdfwith the 13/14 (93%) namespace majority:muandsigmaparameter labels corrected from "mean"/"standard deviation" to "location parameter"/"scale parameter" across JSDoc, TS declarations,repl.txt, andREADME.md, and thesigma < 0example comment updated to "Negative scale parameter" to match sibling phrasing. Thefactory.jsJSDoc summary was also given the matching distribution-description prose, which was previously absent. TYPE annotations (NonNegativeNumberforsigma) are intentionally unchanged — bothmain.jsandfactory.jslegitimately acceptsigma === 0by delegating to the degenerate distribution.Related Issues
No.
Questions
No.
Other
Validation
package.json/manifest.json/ README header parsing across all 14 members.lib/main.js,lib/index.js, andlib/factory.js(where present) to capture public signature, validation prologue, error construction, JSDoc shape, and@stdlib/*dependencies.logcdfand clarified thatfactory.js'sNonNegativeNumberforsigmais intentional (factory delegates to the degenerate distribution atsigma === 0).test/test.logcdf.js(lines 108–127) andtest/test.factory.js(lines 131–153) both assert thatlogcdf(..., sigma=0)returns the degenerate result, so changing the JSDoc type fromNonNegativeNumbertoPositiveNumberwould contradict observed behavior — that change was dropped.logcdf(12/14 majority) were dropped because adding them mechanically requires regenerating ground-truth JSON and rewiringtest.logcdf.js/test.factory.jsto consume them, which exceeds the "mechanical, single-package" scope of this routine; missing Julia fixtures inctorare intentional (constructor has no fixture-based numerical tests).factory.jssigmatype andctortest layout), outliers whose tests rely on the deviation (logcdfsigma === 0tests), and features without a clear majority (C bindings,returnsTagtype, error construction, validation prologue sequences).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was produced by Claude Code via an automated cross-package API drift detection routine: a randomly selected stdlib namespace (
stats/base/dists/lognormal, seed20260428) had structural and semantic features extracted from each member, the majority pattern computed per feature (75% conformance threshold), and outliers validated by three independent agents (semantic, cross-reference, and structural) before being committed. Only documentation (JSDoc / README /repl.txt/ TS-decl) wording is changed; behavior, signatures, and types are unchanged.@stdlib-js/reviewers
Generated by Claude Code