Skip to content

docs: update descriptions#13370

Merged
kgryte merged 7 commits into
developfrom
philipp/drift-stats-base-dists-pareto-type1-2026-07-08
Jul 8, 2026
Merged

docs: update descriptions#13370
kgryte merged 7 commits into
developfrom
philipp/drift-stats-base-dists-pareto-type1-2026-07-08

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • Realigns three outlier packages in @stdlib/stats/base/dists/pareto-type1 with the namespace-wide documentation conventions: logcdf source docstrings incorrectly described the function as the CDF (a copy-paste bug — the package is the natural-log of the CDF, as its own docs/repl.txt, docs/types/index.d.ts, and README.md already document); logpdf was the sole in-namespace outlier on lib/index.js brief, README.md title blockquote, and package.json description, still carrying the verb-phrase Evaluate the … for a Pareto (Type I) distribution. form; pdf/lib/index.js was the second outlier on the module-doc brief (its README and package.json had already been normalized). No behavior changes; 8 files, 8 lines.

Namespace summary

  • Target: @stdlib/stats/base/dists/pareto-type1
  • Members analyzed: 14 (cdf, ctor, entropy, kurtosis, logcdf, logpdf, mean, median, mode, pdf, quantile, skewness, stdev, variance)
  • Features analyzed: file tree, package.json top-level / scripts / stdlib / directories / keywords keys and description value, README.md heading sequence and title blockquote, manifest.json shape, test/benchmark/examples filenames, public signature, return kind, validation prologue, error construction, JSDoc shape (@param/@returns/@throws/@example), lib/main.js require dependencies, lib/index.js module-doc brief, lib/native.js/src/main.c/include/**/*.h docstrings, factual accuracy of the source docstring against the package name.
  • Features with clear majority (≥75%): lib/index.js module-doc brief noun-phrase form <Name> distribution <thing>. at 12/14 = 85.7% (outliers: logpdf, pdf); README.md title blockquote noun-phrase form at 13/14 = 92.9% (outlier: logpdf); package.json description noun-phrase form at 13/14 = 92.9% (outlier: logpdf); source docstring correctly describes the function at 13/14 = 92.9% (outlier: logcdf, whose lib/main.js, lib/native.js, src/main.c, and include/**/logcdf.h describe it as the CDF); JS source docstring mirrored in the C mirror at 12/13 = 92.3% among native-backed packages (same logcdf outlier). Cross-namespace confirmation via structural-review agent against all stats/base/dists/*/logcdf (24/25 conform) and stats/base/dists/*/pdf (26/31 conform) siblings.
  • Features without clear majority (excluded from drift detection): all previously covered by PR refactor: add explicit isnan guards #13343 (isnan guard shape, native-bindings absence in ctor/median, lib/factory.js presence, public signature shape, error construction, README ## Notes section, dependency sets, SVG naming) — no new majority-less features surfaced this run.

stats/base/dists/pareto-type1/logcdf

Fix a copy-paste bug in the source docstrings. lib/main.js:32, lib/native.js:29, src/main.c:26, and include/stdlib/stats/base/dists/pareto-type1/logcdf.h:30 all read Evaluates the cumulative distribution function (CDF) for a Pareto (Type I) distribution …, but the package evaluates the natural logarithm of the CDF, as @returns {number} evaluated logCDF in the same JSDoc, docs/repl.txt, docs/types/index.d.ts, and README.md already document. The four docstrings were copy-pasted from pareto-type1/cdf without updating the brief; 24 of 25 <dist>/logcdf packages across stats/base/dists/* already carry the corrected phrasing (Evaluates the natural logarithm of the cumulative distribution function (CDF) …), matching pareto-type1/logpdf/lib/main.js:31 verbatim.

stats/base/dists/pareto-type1/logpdf

Realign README.md:23, lib/index.js:22, and package.json:4 with the namespace's noun-phrase convention <Name> distribution <thing>. used by 12 of 14 sibling lib/index.js briefs (85.7%), 13 of 14 sibling README blockquotes (92.9%), and 13 of 14 sibling package.json descriptions (92.9%). The prior verb-phrase form Evaluate the natural logarithm of the probability density function (PDF) for a Pareto (Type I) distribution. was the sole in-namespace outlier on all three axes. New phrasings mirror pareto-type1/logcdf word-for-word (word order, capitalization, and — in package.json — the namespace convention of eliding natural for brevity); the README blockquote preserves the trailing (PDF) acronym per the cross-namespace PDF-family README convention (25 of 26 sibling <dist>/logpdf READMEs keep it, versus the CDF-family which drops the acronym).

stats/base/dists/pareto-type1/pdf

Realign lib/index.js:22 with the noun-phrase convention. This was the sole in-namespace lib/index.js outlier alongside logpdf (now also realigned). 26 of 31 sibling <dist>/pdf packages across stats/base/dists/* already use the noun-phrase form. The package's own README.md:23 blockquote, docs/repl.txt, and package.json:4 description already read Pareto (Type I) distribution probability density function (PDF).; only the lib/index.js module-doc brief was drifting. Post-fix, all four in-package briefs match verbatim.

Validation

Checked:

  • structural feature extraction (file tree, package.json shape, README section list and title blockquote, manifest.json shape, test/benchmark/example filenames) across all 14 members.
  • semantic feature extraction (public signature, validation prologue, error construction, JSDoc shape, dependency set, module-doc brief, source-docstring factual accuracy) across all 14 members by reading each lib/main.js, lib/index.js, lib/native.js, src/main.c, and the corresponding include/**/*.h directly.
  • three-agent drift validation on the five candidate corrections:
    • opus semantic-review returned confirmed-drift for all five, citing @returns {number} evaluated logCDF in logcdf/lib/main.js:37 as direct contradiction of the buggy Evaluates the cumulative distribution function brief on line 32, and verifying the sibling comparisons for the phrasing normalizations.
    • opus cross-reference returned safe-to-apply for four, and needs-human for logpdf/lib/index.js on the grounds that the namespace-level stats/base/dists/pareto-type1/README.md <toc> TOC entry for logpdf currently mirrors the old verb-phrase brief — which is a generator-owned artifact and out of scope per gate 7a (the TOC will re-generate from the corrected source on the next docs: update namespace table of contents pass, as it did for pdf when pdf/lib/index.js was previously normalized).
    • sonnet structural-review expanded the majority check across the whole stats/base/dists/* ecosystem: confirmed F1/F2/F3 as high-conformance drift (24/25, 15/26, 26/31 respectively); refined F4 to keep the trailing (PDF) acronym after finding 25/26 sibling <dist>/logpdf READMEs keep it (the initial fix would have matched only frechet); rejected F5 (linkify probability density function in pdf/README.md) as a wrong-fix — the current unlinked (PDF) form matches the largest sibling group (16/31), so pareto-type1's pdf is already within the PDF-family majority.

Deliberately excluded:

  • pdf/README.md:23 blockquote linkification. Rejected by sonnet structural-review: 16 of 31 sibling <dist>/pdf READMEs use the unlinked distribution probability density function (PDF). form (the largest single group); only 7 of 31 use the linked variant. The CDF-family linkifies almost universally (33/36), but the PDF-family does not — the two families' README conventions differ intentionally.
  • Namespace-level stats/base/dists/pareto-type1/README.md <toc> block. Autogenerated from the source briefs; gated out per 7a; will re-populate on next TOC-regeneration commit.
  • All drift previously addressed by refactor: add explicit isnan guards #13343 (isnan guard shape in mean/median, and all associated per-namespace/cross-namespace deliberate exclusions listed there). Re-analysis confirms mean/median are now in-family.
  • median native-bindings absence — the open PR feat: add C implementation for stats/base/dists/pareto-type1/median #10079 adds it; orthogonal to this run.
  • ctor errorConstruction = "format" and stdev prologue-less delegation via sqrt( variance( α, β ) ) — intentional deviations, unchanged from refactor: add explicit isnan guards #13343's exclusion list.

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.

Second run of the cross-package drift-detection routine on stats/base/dists/pareto-type1; the earlier run (PR #13343, merged 2026-07-07) covered validation-prologue drift on mean/median and enumerated the majority-less features as deliberate exclusions. This run picked up a different axis — source-docstring factual accuracy in logcdf and doc-brief phrasing style in logpdf/pdf — that #13343 did not flag. No conflict with the open native-binding PR #10079 for pareto-type1/median, which touches only new native files and appends a ## C APIs section to median/README.md — orthogonal to the logcdf / logpdf / pdf docstrings modified here.

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)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code via the cross-package drift-detection routine: structural and semantic features were extracted from every member of stats/base/dists/pareto-type1, majority patterns were computed at a 75% conformance threshold, and three independent validation agents (opus semantic-review, opus cross-reference, sonnet cross-namespace structural-review) reviewed each candidate correction before any file was edited. The structural-review pass dropped one candidate as a wrong-fix (would have moved pdf/README.md from majority PDF-family style into a minority) and refined a second to preserve the trailing (PDF) acronym; the remaining four survived unchanged. Each edit is a documentation-string realignment with no source, test, REPL, TypeScript, or observable-behavior change.


@stdlib-js/reviewers


Generated by Claude Code

claude added 3 commits July 8, 2026 04:23
…type1/logcdf`

The JSDoc, native.js, C source, and C header docstrings all described
the function as "Evaluates the cumulative distribution function (CDF)"
when the package evaluates the natural logarithm of the CDF. The
package's own `docs/repl.txt`, `docs/types/index.d.ts`, and `README.md`
title/intro already document the function correctly; only the source
comments were copy-pasted from `pareto-type1/cdf` without updating the
brief. Also inconsistent with sibling `logpdf/lib/main.js`, which
correctly reads "Evaluates the natural logarithm of the probability
density function (PDF)…" — 24 of 25 `<dist>/logcdf` packages across
`stats/base/dists/*` already carry the corrected phrasing.
…pdf`

Aligns the `README.md` title blockquote, the `lib/index.js` module-doc
brief, and the `package.json` description with the namespace's
noun-phrase convention `<Name> distribution <thing>.` used by 12 of 14
sibling `lib/index.js` briefs (85.7% conformance), 13 of 14 sibling
README blockquotes (92.9%), and 13 of 14 sibling package.json
descriptions (92.9%). The prior verb-phrase form
`Evaluate the natural logarithm of the probability density function
(PDF) for a Pareto (Type I) distribution.` was the sole
`lib/index.js`/README outlier in the namespace and the sole
`package.json` outlier. New phrasings mirror `pareto-type1/logcdf`
verbatim (word order, capitalization, elided `natural` in package.json,
preserved trailing `(PDF)` acronym per the PDF-family convention).
Aligns the `lib/index.js` module-doc brief with the namespace's
noun-phrase convention `<Name> distribution <thing>.` used by 12 of 14
sibling `lib/index.js` briefs (85.7% conformance) and by 26 of 31
sibling `<dist>/pdf` packages across `stats/base/dists/*` (83.9%). The
prior verb-phrase form `Evaluate the probability density function
(PDF) for a Pareto (Type I) distribution.` was the sole in-namespace
outlier alongside `logpdf` (now realigned in the previous commit). The
package's own `README.md` blockquote, `docs/repl.txt`, and
`package.json` description already carry the noun-phrase form; only
`lib/index.js` was drifting.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Jul 8, 2026
@stdlib-bot

stdlib-bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/pareto-type1/logcdf $\\color{green}327/327$
$\\color{green}+0.00\\%$
$\\color{green}25/25$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}327/327$
$\\color{green}+0.00\\%$

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

Comment thread lib/node_modules/@stdlib/stats/base/dists/pareto-type1/pdf/lib/index.js Outdated
@kgryte kgryte marked this pull request as ready for review July 8, 2026 06:08
@kgryte kgryte requested a review from a team July 8, 2026 06:08
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 8, 2026
@kgryte kgryte changed the title docs: correct logcdf docstrings and normalize brief phrasings in stats/base/dists/pareto-type1 docs: update descriptions Jul 8, 2026
@kgryte kgryte merged commit a3c9b30 into develop Jul 8, 2026
31 checks passed
@kgryte kgryte deleted the philipp/drift-stats-base-dists-pareto-type1-2026-07-08 branch July 8, 2026 06:32
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 8, 2026
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.

4 participants