@mark1russell7/rigor-bench 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/build/index.d.ts +10 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +22 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ v.comparison; // the cases that gain and dro
|
|
|
34
34
|
| Function | What it gives |
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| `firstArm(round, offset)` | The arm that runs first. The order turns each round, and an odd offset starts with arm `b`. |
|
|
37
|
-
| `armOrder(arms, round)` | The order of any count of arms in a round. Each pair of arms has each order within 1 after each count of rounds. |
|
|
37
|
+
| `armOrder(arms, round)` | The order of any count of arms in a round. Each pair of arms has each order within 1 after each count of rounds. A report that keeps no `first` for each pair states the order that it used, so that a reader can make `first` again. |
|
|
38
38
|
| `checkPairedTime(record)` | The record, or a `RangeError` for a time that is not a finite number above 0. |
|
|
39
39
|
| `caseRatios(records)` | The ratio of each case. It refuses 2 records of one round, and an order that did not turn. |
|
|
40
40
|
| `orderSize(records)` | The count of records per first arm, the order effect, and the amount that unequal counts can move a mean. This size is a guide, because a verdict reads a median. |
|
|
@@ -310,6 +310,7 @@ const claim = winClaim(check, "fill", "my-entry");
|
|
|
310
310
|
Each row has a `measure`, a `group`, a `key` and a `value`. The optional fields are `censored`, `method` and `stratum`. The function throws a `RangeError` for a repeat of a measure, a group and a key. The caller states how repeats reduce to one row.
|
|
311
311
|
|
|
312
312
|
- **Beats:** the Holm-corrected sign test passes. With a `resolution`, the median paired difference is also over it. Without one, the output says `test only`.
|
|
313
|
+
- **Floors:** a rule can state `floors`, one number for each group. The noise of a measure can differ by group, so one number for all groups removes real gains or passes noise. A comparison then needs a size over the larger floor of its two groups, and `floor` gives that size. A group with no floor reads `resolution`. A group with neither makes the check throw.
|
|
313
314
|
- **A control wins** when no real entry beats it. A tie counts for the control.
|
|
314
315
|
- **A control loses a partner** when one real entry beats it on that partner, at the level divided by the count of partners. One passed partner clears `uncaught`, so each partner is one more chance.
|
|
315
316
|
- **Families:** one Holm family holds one control on one measure, over all real entries and all strata. A second family holds the same tests in the other direction, and `beatsEntries` of `of` gives its count. One family holds the spread of one measure.
|
package/build/index.d.ts
CHANGED
|
@@ -1057,6 +1057,11 @@ interface MeasureRule {
|
|
|
1057
1057
|
readonly partners: readonly string[];
|
|
1058
1058
|
/** The smallest median paired difference that counts. Without it, only the test decides, and the output says so. It has no default. */
|
|
1059
1059
|
readonly resolution?: number;
|
|
1060
|
+
/**
|
|
1061
|
+
* The smallest median paired difference that counts for each group. A comparison needs a size over the larger floor of its two groups.
|
|
1062
|
+
* A group with no floor reads `resolution`. A group with neither makes the check throw, so a comparison does not fall back to the test alone.
|
|
1063
|
+
*/
|
|
1064
|
+
readonly floors?: Readonly<Record<string, number>>;
|
|
1060
1065
|
/** The reason and the date, for a rule with no controls. */
|
|
1061
1066
|
readonly noControl?: NoControl;
|
|
1062
1067
|
}
|
|
@@ -1098,7 +1103,9 @@ interface Comparison {
|
|
|
1098
1103
|
readonly tooFew: boolean;
|
|
1099
1104
|
/** This field is true when the shared keys reach `needs` and ties took them under it. So the two read as equal, not as unread. */
|
|
1100
1105
|
readonly tied: boolean;
|
|
1101
|
-
/** The
|
|
1106
|
+
/** The size that this comparison needs: the larger floor of its two groups, else the resolution. It is absent for a measure with neither. */
|
|
1107
|
+
readonly floor?: number;
|
|
1108
|
+
/** The test passes, and the median difference is over `floor` when the comparison has one. */
|
|
1102
1109
|
readonly beats: boolean;
|
|
1103
1110
|
}
|
|
1104
1111
|
/** The read of one control on one measure and one stratum. */
|
|
@@ -1161,7 +1168,7 @@ interface GuardRead {
|
|
|
1161
1168
|
interface MeasureCheck {
|
|
1162
1169
|
readonly measure: string;
|
|
1163
1170
|
readonly sense: "higher" | "lower";
|
|
1164
|
-
/** `test only`: a measure with no resolution. `test and resolution`: a measure with one. */
|
|
1171
|
+
/** `test only`: a measure with no resolution and no floors. `test and resolution`: a measure with one of these. */
|
|
1165
1172
|
readonly basis: "test only" | "test and resolution";
|
|
1166
1173
|
/** The only method of the rows. It is undefined when the rows give none. */
|
|
1167
1174
|
readonly method: string | undefined;
|
|
@@ -1265,7 +1272,7 @@ interface JointClaim {
|
|
|
1265
1272
|
* This function reads the controls and the spread of each measure of a bench.
|
|
1266
1273
|
*
|
|
1267
1274
|
* - A control wins a measure when no real entry beats it on the keys that both finished. A tie counts for the control.
|
|
1268
|
-
* - A real entry beats a control when the Holm-corrected sign test passes and the median paired difference is
|
|
1275
|
+
* - A real entry beats a control when the Holm-corrected sign test passes and the median paired difference clears the bar. The bar is the larger floor of the two, else the resolution.
|
|
1269
1276
|
* - One Holm family holds the tests of one control on one measure over all real entries and all strata.
|
|
1270
1277
|
* - One more Holm family holds the tests of one control against the real entries, with the same need and resolution. A control that beats none of them is weak.
|
|
1271
1278
|
* - One Holm family holds the tests of the spread of one measure over all pairs of real entries and all strata.
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Comparison"],"sources":["../src/budget.ts","../src/verdict.ts","../src/limit.ts","../src/merge.ts","../src/gate.ts","../src/control.ts","../src/ladder.ts","../src/model.ts","../src/tail.ts","../src/measures.ts","../src/power.ts","../src/rounds.ts"],"mappings":";;;UAQiB;;WAEN;;WAEA;WACA;;;KAIC;;UAGK;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;;WAEA;;WAEA;WACA;;WAEA;;WAEA;;WAEA;WACA;;WAEA;WACA,SAAS;;WAET;;;UAIM;WACN,SAAS;;WAET;WACA;WACA;WACA;WACA,gBAAgB;;;;;;;;;;;;wBAyDX,cAAc,iBAAiB,eAAe,aAAa,eAAe,SAAS,gBAAgB;;UAyBlG;WACN;WACA;;;;;;qBAOE,uBAAuB;;UAOnB;;WAEN;;WAEA;;WAEA,iBAAiB;;WAEjB;;;U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kB;;;UAoBZ;;WAEN;;WAEA;;;;;;;;;;wBAwBK,aAAa,2BAA2B,yBAAyB,eAAe,mBAAmB,UAAS,8BAAmC;;wBAe/I,UAAU,gBAAgB,aAAa,UAAS,mBAAwB;;wBAgDxE,aAAa,KAAK,UAAU;;UAiB3B;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;;WAEA;;WAEA;;;qBAIE;;wBAGG,aAAa,QAAQ,aAAa,gBAAgB;;UAMjD;WACN;WACA;;;UAIM;WACN;WACA;;WAEA;;;wBAIK,UAAU,gBAAgB,YAAY;;UC3PrC;WACN;;WAEA;WACA;;;UAIM;;WAEN;;WAEA;;;UAIM;;WAEN,OAAO,cAAc,qBAAqB;;WAE1C;;;UAIM,yBAAyB;;;;;WAK/B;;WAEA;;;;;WAKA;;;UAIM,sBAAsB;;WAE5B;WACA,OAAO;;WAEP;;WAEA;WACA,SAAS;;;UAIH;WACN;;WAEA;;;UAIM;;WAEN;;WAEA,gBAAgB;;;UAIV;WACN,SAAS;;WAET;WACA,gBAAgB;;WAEhB;WACA;WACA;;;;;;wBAqBK,UAAU,kBAAkB,cAAc,gBAAW;;;;;;;;;;;;;;;wBAoCrD,iBAAiB,oBAAoB,cAAc,aAAa,cAAc,SAAS,mBAAmB;;;;;;;;;;wBA6C1G,eAAe,aAAa,cAAc,SAAS,kBAAkB;;UC9KpE;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;;WAEN;;WAEA;;;UAIM;WACN;;WAEA;;WAEA;;WAEA;;WAEA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Comparison"],"sources":["../src/budget.ts","../src/verdict.ts","../src/limit.ts","../src/merge.ts","../src/gate.ts","../src/control.ts","../src/ladder.ts","../src/model.ts","../src/tail.ts","../src/measures.ts","../src/power.ts","../src/rounds.ts"],"mappings":";;;UAQiB;;WAEN;;WAEA;WACA;;;KAIC;;UAGK;;WAEN;;WAEA;;WAEA;;;UAIM;WACN;;WAE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AAa,SAAS,eAAe;;UClCpC;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM;WACN,SAAS;;WAET;;WAEA;;;;;;;wBAQK,WAAW,MAAM,SAAS,OAAO,qBAAqB,SAAS,gBAAgB"}
|
package/build/index.js
CHANGED
|
@@ -1729,6 +1729,7 @@ function checkedRules(options) {
|
|
|
1729
1729
|
if (!rules.has(partner)) throw new RangeError(`checkMeasures: the partner ${JSON.stringify(partner)} of ${name} has no rule.`);
|
|
1730
1730
|
}
|
|
1731
1731
|
if (rule.resolution !== void 0 && !(Number.isFinite(rule.resolution) && rule.resolution >= 0)) throw new RangeError(`checkMeasures: the resolution of ${name} is finite and 0 or more, not ${rule.resolution}.`);
|
|
1732
|
+
for (const [group, floor] of Object.entries(rule.floors ?? {})) if (!(Number.isFinite(floor) && floor >= 0)) throw new RangeError(`checkMeasures: the floor of ${JSON.stringify(group)} on ${name} is finite and 0 or more, not ${floor}.`);
|
|
1732
1733
|
if (rule.noControl !== void 0) {
|
|
1733
1734
|
if (rule.controls.length > 0) throw new RangeError(`checkMeasures: ${name} has controls and also noControl.`);
|
|
1734
1735
|
checkedDate(`the date of ${name}`, rule.noControl.until);
|
|
@@ -1786,8 +1787,19 @@ function rawTest(better, other, stratum, groups, sense) {
|
|
|
1786
1787
|
medianDifference: median(differences)
|
|
1787
1788
|
};
|
|
1788
1789
|
}
|
|
1790
|
+
/** This function gives the size that a comparison of two groups needs. The value is undefined only for a rule with no floors and no resolution. */
|
|
1791
|
+
function floorOf(rule, a, b) {
|
|
1792
|
+
const floors = rule.floors;
|
|
1793
|
+
if (floors === void 0) return rule.resolution;
|
|
1794
|
+
const ofGroup = (group) => {
|
|
1795
|
+
const floor = Object.hasOwn(floors, group) ? floors[group] : rule.resolution;
|
|
1796
|
+
if (floor === void 0) throw new RangeError(`checkMeasures: the group ${JSON.stringify(group)} of ${JSON.stringify(rule.measure)} has no floor, and the rule has no resolution.`);
|
|
1797
|
+
return floor;
|
|
1798
|
+
};
|
|
1799
|
+
return Math.max(ofGroup(a), ofGroup(b));
|
|
1800
|
+
}
|
|
1789
1801
|
/** This function corrects one family of tests, over all strata. A test with too few keys beats nothing, even when a step of Holm passes it. */
|
|
1790
|
-
function corrected(tests, sides, alpha,
|
|
1802
|
+
function corrected(tests, sides, alpha, rule) {
|
|
1791
1803
|
if (tests.length === 0) return [];
|
|
1792
1804
|
const family = tests.length;
|
|
1793
1805
|
const needs = pairsNeeded(alpha / family, sides);
|
|
@@ -1797,7 +1809,8 @@ function corrected(tests, sides, alpha, resolution) {
|
|
|
1797
1809
|
const n = t.wins + t.losses;
|
|
1798
1810
|
const tooFew = n < needs;
|
|
1799
1811
|
const size = sides === 1 ? t.medianDifference : Math.abs(t.medianDifference);
|
|
1800
|
-
const
|
|
1812
|
+
const floor = floorOf(rule, t.better, t.other);
|
|
1813
|
+
const clears = floor === void 0 || size > floor;
|
|
1801
1814
|
return {
|
|
1802
1815
|
...t,
|
|
1803
1816
|
n,
|
|
@@ -1808,6 +1821,7 @@ function corrected(tests, sides, alpha, resolution) {
|
|
|
1808
1821
|
needs,
|
|
1809
1822
|
tooFew,
|
|
1810
1823
|
tied: tooFew && t.shared >= needs,
|
|
1824
|
+
...floor === void 0 ? {} : { floor },
|
|
1811
1825
|
beats: !tooFew && steps[i]?.reject === true && clears
|
|
1812
1826
|
};
|
|
1813
1827
|
});
|
|
@@ -1818,8 +1832,8 @@ const unread = (c) => c.tooFew && !c.tied;
|
|
|
1818
1832
|
/** The reads of one control on one measure: one for each stratum of the measure. */
|
|
1819
1833
|
function controlReads(measure, control, data, rule, real, alpha) {
|
|
1820
1834
|
if (data === void 0) return [];
|
|
1821
|
-
const comparisons = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry) => rawTest(entry, control, stratum, groups, rule.sense) ?? [])), 1, alpha, rule
|
|
1822
|
-
const attacks = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry) => rawTest(control, entry, stratum, groups, rule.sense) ?? [])), 1, alpha, rule
|
|
1835
|
+
const comparisons = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry) => rawTest(entry, control, stratum, groups, rule.sense) ?? [])), 1, alpha, rule);
|
|
1836
|
+
const attacks = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry) => rawTest(control, entry, stratum, groups, rule.sense) ?? [])), 1, alpha, rule);
|
|
1823
1837
|
return [...data.keys()].map((stratum) => {
|
|
1824
1838
|
const here = comparisons.filter((c) => c.stratum === stratum);
|
|
1825
1839
|
const against = attacks.filter((c) => c.stratum === stratum);
|
|
@@ -1838,7 +1852,7 @@ function controlReads(measure, control, data, rule, real, alpha) {
|
|
|
1838
1852
|
}
|
|
1839
1853
|
/** The read of the spread of one measure: one family over all pairs of real entries and all strata. */
|
|
1840
1854
|
function spreadReads(data, rule, real, alpha) {
|
|
1841
|
-
const comparisons = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry, i) => real.slice(i + 1).flatMap((other) => rawTest(entry, other, stratum, groups, rule.sense) ?? []))), 2, alpha, rule
|
|
1855
|
+
const comparisons = corrected([...data].flatMap(([stratum, groups]) => real.flatMap((entry, i) => real.slice(i + 1).flatMap((other) => rawTest(entry, other, stratum, groups, rule.sense) ?? []))), 2, alpha, rule);
|
|
1842
1856
|
return {
|
|
1843
1857
|
reads: [...data.keys()].map((stratum) => {
|
|
1844
1858
|
const here = comparisons.filter((c) => c.stratum === stratum);
|
|
@@ -2037,7 +2051,7 @@ function checkRule(rule, reading, asOf) {
|
|
|
2037
2051
|
});
|
|
2038
2052
|
else if (testable.length > 0 && !comparisons.some((c) => c.beats)) {
|
|
2039
2053
|
const widest = Math.max(...comparisons.map((c) => Math.abs(c.medianDifference)));
|
|
2040
|
-
const basis = rule.resolution === void 0 ? "by the test only" : `by the test and the resolution ${rule.resolution}`;
|
|
2054
|
+
const basis = rule.floors !== void 0 ? "by the test and the floors of the groups" : rule.resolution === void 0 ? "by the test only" : `by the test and the resolution ${rule.resolution}`;
|
|
2041
2055
|
findings.push({
|
|
2042
2056
|
kind: "no-spread",
|
|
2043
2057
|
measure: rule.measure,
|
|
@@ -2050,7 +2064,7 @@ function checkRule(rule, reading, asOf) {
|
|
|
2050
2064
|
check: {
|
|
2051
2065
|
measure: rule.measure,
|
|
2052
2066
|
sense: rule.sense,
|
|
2053
|
-
basis: rule.resolution === void 0 ? "test only" : "test and resolution",
|
|
2067
|
+
basis: rule.resolution === void 0 && rule.floors === void 0 ? "test only" : "test and resolution",
|
|
2054
2068
|
method: mixed ? void 0 : methods[0],
|
|
2055
2069
|
mixed,
|
|
2056
2070
|
guards,
|
|
@@ -2067,7 +2081,7 @@ function checkRule(rule, reading, asOf) {
|
|
|
2067
2081
|
* This function reads the controls and the spread of each measure of a bench.
|
|
2068
2082
|
*
|
|
2069
2083
|
* - A control wins a measure when no real entry beats it on the keys that both finished. A tie counts for the control.
|
|
2070
|
-
* - A real entry beats a control when the Holm-corrected sign test passes and the median paired difference is
|
|
2084
|
+
* - A real entry beats a control when the Holm-corrected sign test passes and the median paired difference clears the bar. The bar is the larger floor of the two, else the resolution.
|
|
2071
2085
|
* - One Holm family holds the tests of one control on one measure over all real entries and all strata.
|
|
2072
2086
|
* - One more Holm family holds the tests of one control against the real entries, with the same need and resolution. A control that beats none of them is weak.
|
|
2073
2087
|
* - One Holm family holds the tests of the spread of one measure over all pairs of real entries and all strata.
|