style: align outliers in stats/base/dists/binomial with namespace majority patterns#11902
Draft
Planeshifter wants to merge 3 commits intodevelopfrom
Draft
style: align outliers in stats/base/dists/binomial with namespace majority patterns#11902Planeshifter wants to merge 3 commits intodevelopfrom
stats/base/dists/binomial with namespace majority patterns#11902Planeshifter wants to merge 3 commits intodevelopfrom
Conversation
Added missing keywords to `package.json`: `bernoulli` and `binom` (present in 13/14 siblings, 92.9%); `successes`, `independent trials`, `exponential family` (present in 11/14 siblings, 78.6%).
…tions Added missing keywords to `package.json`: `successes`, `independent trials`, `exponential family` (present in 11/14 siblings, 78.6%).
Added missing keywords to `package.json`: `successes`, `independent trials`, `exponential family` (present in 11/14 siblings, 78.6%).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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
Aligning outliers in
stats/base/dists/binomialwith namespace majority patterns (random namespace pick, seed2026-05-03-drift-vote).Namespace summary
@stdlib/stats/base/dists/binomialcdf,ctor,entropy,kurtosis,logpmf,mean,median,mgf,mode,pmf,quantile,skewness,stdev,variance)package.jsontop-level keys,package.jsonkeywords,package.jsondirectories, README section sequence, test/benchmark/examples filenames, dependency sets (fromlib/main.jsrequirecalls), validation prologue sequence, public signature sequence, return kind, JSDoc shape.package.jsontop-level key set (18 keys, 100%);package.jsondirectorieskeysbenchmark/doc/example/lib/test(100%); README sections## Usageand## Examples(100%); 14 majoritykeywords(stdlib,stdmath,statistics,stats,distribution,dist,successes,independent trials,discrete,bernoulli,exponential family,binomial,binom,univariate); 6-step validation-prologue subsequence (isnan(n),isnan(p),p < 0.0,p > 1.0,!isNonNegativeInteger(n),n === PINF) at 12/14 = 85.7%; majoritylib/main.jsdeps@stdlib/math/base/assert/is-nonnegative-integer,@stdlib/math/base/assert/is-nan,@stdlib/constants/float64/pinf(each 12/14 = 85.7%).manifest.json,binding.gyp,include.gypi,src/**,lib/native.js,benchmark/c/**,benchmark/benchmark.native.js,examples/c/**,test/test.native.js) at 10/14 = 71.4%;## C APIsREADME section /### Usage/### Examplessub-block at 10/14 = 71.4%;gypfilepackage.jsonkey at 10/14 = 71.4%;test/fixtures/julia/data.jsonat 6/14 = 42.9%; public signature shape (split between(n, p)summary stats and(x, n, p)distribution-functions; no shape ≥75%); error construction (onlyctorthrows; rest returnNaN).stats/base/dists/binomial/ctorFixes keyword drift in
@stdlib/stats/base/dists/binomial/ctorrelative to thestats/base/dists/binomialnamespace (14 members). Addsbernoulliandbinom, each present in 13/14 siblings (92.9%), andsuccesses,independent trials, andexponential family, each present in 11/14 siblings (78.6%). Metadata-only change; no code or behavior modified.stats/base/dists/binomial/logpmfAdds
successes,independent trials, andexponential familyto thepackage.jsonkeywords for@stdlib/stats/base/dists/binomial/logpmf, aligning with 11/14 siblings in thestats/base/dists/binomialnamespace (78.6% conformance). The same keywords were missing frompmf; both packages lacked the distribution-context terms carried by every summary-statistic sibling (mean,variance,kurtosis,skewness,entropy, etc.). No code or behavioral changes; metadata only.stats/base/dists/binomial/pmfAdds three keywords —
successes,independent trials, andexponential family— topackage.jsonfor@stdlib/stats/base/dists/binomial/pmf. All three are present in 11/14 siblings in thestats/base/dists/binomialnamespace (78.6% conformance); their absence frompmf(andlogpmf) was an oversight relative to the summary-statistic packages (mean,variance,kurtosis,skewness,entropy, etc.). No code or behavioral changes; metadata only.Validation
Checked:
package.jsonshape, README section list,manifest.jsonshape, test/benchmark/example filenames) across all 14 members.lib/main.jsdirectly.stdevvalidation prologue,ctorREADME sequence, keyword drift onctor/logpmf/pmf).stdev's validation implementation.ctor/mode/stdev) is a real drift.Deliberately excluded:
stdev/lib/main.jslacks the canonical 6-step validation prologue (delegatesreturn sqrt( variance( n, p ) );). Marked intentional deviation:variancealready performs identical validation;sqrt(NaN) === NaNpreserves observable behavior; sibling distributionspoisson/stdev,pareto-type1/stdev,lognormal/stdevfollow the same delegating idiom. Adding a redundant prologue would not improve correctness.ctorREADME structure (## Usage→## binomial→### Writable Properties/### Computed Properties/### Methods→## Examples) deviates from the canonical## Usage→## Examplesordering. Marked intentional deviation: a class constructor's documentation surface legitimately requires intermediate property/method subsections.ctor/mode/stdevmissingtest/fixtures/julia/REQUIREandtest/fixtures/julia/runner.jl(present in 11/14 siblings, 78.6%). Marked intentional deviation:ctoris a class constructor with no numerical computation of its own;modeis a closed-form integer formulafloor((n+1)*p)whose tests inline-verify the formula;stdevuses Python fixtures (test/fixtures/python/data.json,runner.py) instead.manifest.json,binding.gyp,src/, etc.) at 71.4% conformance — below the 75% threshold and excluded from drift detection.(n, p)summary-statistic packages and(x|t|r, n, p)distribution-function packages — no signature shape reaches 75%.Related Issues
This pull request has no related issues.
Questions
No.
Other
Random namespace pick, seed
2026-05-03-drift-vote. Eligibility criteria: ≥8 non-autogenerated direct child packages, restricted to the 8–25-member tractable size band for agent budget. The chosen namespace had no autogenerated members, so the full membership is in scope.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
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/binomial, majority patterns were computed at a 75% conformance threshold, and three independent validation agents (opus semantic-review, opus cross-reference, sonnet structural-review) confirmed each correction was high-signal mechanical drift before any file was edited. All edits are purepackage.jsonkeywordsadditions; no source, test, or behavioral changes.@stdlib-js/reviewers
Generated by Claude Code