@elaraai/e3-ui 1.0.12 → 1.0.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/experiment/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACH,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,EACb,MAAM,eAAe,CAAC;AAOvB;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AACH,kDAAkD;AAClD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;;;;;;;;;EAKxB,CAAC;AACH,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;EAI1B,CAAC;AACH,8CAA8C;AAC9C,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;;;;;;EAMnB,CAAC;AACH,uCAAuC;AACvC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AACH,iDAAiD;AACjD,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAM3D;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;EAGjB,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;AAClF,eAAO,MAAM,gBAAgB;IACzB,yCAAyC;;IAEzC,2DAA2D;;IAE3D,wHAAwH;;IAExH,4DAA4D;;EAE9D,CAAC;AACH,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AAMvD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmC,CAAC;AAC/D,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;GAIxB,CAAC;AACJ,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;YAlRvB,yEAAyE;;YAEzE,0EAA0E;;YAE1E,sEAAsE;;YAEtE,qFAAqF;;;QA2BrF,gFAAgF;;;;;;;;;;;;;;;;;;;;;;EAwPlF,CAAC;AACH,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;YA9RpB,yEAAyE;;YAEzE,0EAA0E;;YAE1E,sEAAsE;;YAEtE,qFAAqF;;;QA2BrF,gFAAgF;;;;;;;;;;;;;;;;;;;;;;GA6PhC,CAAC;AACrD,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC"}
@@ -3,328 +3,290 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  /**
6
- * The `Experiment` render contract — the **e3-ui-owned** boundary types the
7
- * component reads and the developer's bound functions return.
6
+ * The `Experiment` render contract.
8
7
  *
9
- * @remarks
10
- * These are *not* causal-library types: `e3-ui` never imports
11
- * `east-py-datascience`. They are the small contract a sign-flip experiment
12
- * surface needs the causal quantities (`effect` / `ci` / the ALE vectors /
13
- * the refuter numbers) plus the two additions the surface requires (`naive`
14
- * for the raw-vs-adjusted comparison and `balance` for the confounder table).
8
+ * These types are **replicated verbatim (snake_case)** from
9
+ * `east-py-datascience`'s `Causal.Types.*`, so the engine's `Causal.experiment`
10
+ * result unifies **structurally** with the component's binding replicate, don't
11
+ * share (East type equality is structural; `e3-ui` never imports
12
+ * `east-py-datascience`). Keep these byte-identical to the datascience
13
+ * definitions they are kept in sync by hand.
15
14
  *
16
- * The split follows the **string-vs-variant rule** ({@link ExperimentSpecType}):
17
- *
18
- * - **Closed choices are variants** — the user's Advanced estimator / target /
19
- * trim selections ({@link EstimatorType}, {@link TargetUnitsType},
20
- * {@link TrimType}). They mirror the causal vocabulary *structurally*, so the
21
- * developer's ~10-line `spec → CausalEffectConfig` bridge is an identity map
22
- * on these fields — but the type lives here, owned by the surface.
23
- * - **Column references are strings** — `treatment` / `outcome` / `confounders`
24
- * are field names introspected from the bound dataset's row struct (the
25
- * `Table` pattern), so they are open over whatever columns the data has.
26
- * - **Presentation is derived, never stored** — no `tone` / bar width / label /
27
- * sentence appears here. The renderer composes every word and colour from the
28
- * numbers + the user's chosen column names.
29
- *
30
- * Where a shape overlaps the library (`Ci`, the ALE vectors) it is
31
- * **structurally identical**, so values unify by shape across the package
32
- * boundary with no shared package and no conversion.
33
- *
34
- * Reached via `Experiment.Types.*` (like `Table.Types.*`), not public named
35
- * exports — users only touch them to type the bound functions / seed datasets.
15
+ * The user edits an {@link ExperimentConfigType} (the staged "question + method")
16
+ * and **Apply** runs the one bound `experiment` function, which returns an
17
+ * {@link ExperimentResultType} — the naive vs adjusted effect, confounder
18
+ * balance, propensity overlap, a robustness summary, and an honesty
19
+ * {@link ExperimentVerdictType}. `adjusted` is `none` when the engine refuses.
36
20
  *
37
21
  * @packageDocumentation
38
22
  */
39
- import { StringType, FloatType, IntegerType, BooleanType, NullType, DateTimeType, ArrayType, StructType, VariantType, OptionType, DictType, VectorType, } from '@elaraai/east';
23
+ import { StructType, VariantType, OptionType, ArrayType, DictType, FloatType, IntegerType, BooleanType, StringType, NullType, DateTimeType, VectorType, } from '@elaraai/east';
40
24
  import { Slice } from '@elaraai/east-ui';
41
25
  // ============================================================================
42
- // Advanced choices — closed vocabularies → variants (mirror the causal terms).
26
+ // Shared vocabulary (= Causal.Types.*)
43
27
  // ============================================================================
44
- /**
45
- * Inverse-propensity weighting scheme for the
46
- * {@link EstimatorType | propensity-weighting} estimator. Structurally mirrors
47
- * the causal library's weighting-scheme variant.
48
- *
49
- * @property ips_weight - Raw inverse propensity weights.
50
- * @property ips_stabilized_weight - Stabilised weights (recommended; lower variance).
51
- * @property ips_normalized_weight - Normalised inverse propensity weights.
52
- */
28
+ /** A confidence interval. */
29
+ export const CiType = StructType({ lower: FloatType, upper: FloatType });
30
+ /** Inverse-propensity weighting scheme. */
53
31
  export const WeightingSchemeType = VariantType({
54
32
  ips_weight: NullType,
55
33
  ips_stabilized_weight: NullType,
56
34
  ips_normalized_weight: NullType,
57
35
  });
58
- /**
59
- * How the like-for-like comparison is estimated — the user's "method" choice in
60
- * the Advanced panel. Closed set, so a variant; structurally mirrors the causal
61
- * estimator vocabulary.
62
- *
63
- * @property linear_regression - Regress the outcome on treatment + confounders.
64
- * @property propensity_score_weighting - Re-weight rows by treatment
65
- * propensity (binary treatment); carries the optional
66
- * {@link WeightingSchemeType}.
67
- */
36
+ /** Backdoor-adjusted effect estimator. */
68
37
  export const EstimatorType = VariantType({
69
38
  linear_regression: NullType,
70
39
  propensity_score_weighting: StructType({
71
40
  weighting_scheme: OptionType(WeightingSchemeType),
72
41
  }),
73
42
  });
74
- /**
75
- * Which population the effect is reported for — the user's "who" choice. Closed
76
- * set, so a variant; structurally mirrors the causal target-units vocabulary.
77
- *
78
- * @property ate - Everyone (average treatment effect).
79
- * @property att - The treated group (average effect on the treated).
80
- * @property atc - The untreated group (average effect on the controls).
81
- */
43
+ /** Population the effect is reported for. */
82
44
  export const TargetUnitsType = VariantType({
83
45
  ate: NullType,
84
46
  att: NullType,
85
47
  atc: NullType,
86
48
  });
87
- /**
88
- * Whether un-matchable rows are dropped before estimating — the user's "trim"
89
- * choice. Closed set, so a variant; structurally mirrors the causal
90
- * propensity-trim vocabulary.
91
- *
92
- * @property overlap - Keep only the common-support overlap of the two groups.
93
- * @property bounds - Keep rows whose propensity is inside explicit `lower` /
94
- * `upper` bounds.
95
- */
96
- export const TrimType = VariantType({
97
- overlap: NullType,
98
- bounds: StructType({
99
- lower: FloatType,
100
- upper: FloatType,
101
- }),
49
+ /** Bootstrap confidence-interval configuration. */
50
+ export const BootstrapConfigType = StructType({
51
+ reps: IntegerType,
52
+ cluster_column: OptionType(StringType),
53
+ confidence_level: OptionType(FloatType),
54
+ });
55
+ /** Which robustness checks to run. */
56
+ export const RefuteSpecType = StructType({
57
+ /** Permuted-treatment negative control — a real effect should vanish. */
58
+ placebo: BooleanType,
59
+ /** Inject an independent random common cause — the effect should hold. */
60
+ random_common_cause: BooleanType,
61
+ /** Re-estimate on random subsamples — the effect should be stable. */
62
+ data_subset: BooleanType,
63
+ /** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
64
+ sensitivity: OptionType(ArrayType(FloatType)),
102
65
  });
103
66
  // ============================================================================
104
- // The experiment the user framed column refs are strings.
67
+ // The config the user edits (= CausalExperimentConfigType)
105
68
  // ============================================================================
106
69
  /**
107
- * The experiment the user framed in the set-up rail the staged value the
108
- * pickers write and **Run** feeds to the bound `estimate` function.
109
- *
110
- * @remarks
111
- * `treatment` / `outcome` / `confounders` / `categorical` are **column names**
112
- * introspected from the bound dataset's row struct, so the surface re-frames
113
- * over whatever columns the data has (the `Table` pattern). The Advanced
114
- * choices ({@link EstimatorType}, {@link TargetUnitsType}, {@link TrimType}) are
115
- * variants. `population` is an optional Slice-style predicate set that narrows
116
- * the rows before estimating.
70
+ * The experiment the user framed the staged value the pickers write and
71
+ * **Apply** feeds to the bound `experiment` function.
117
72
  *
118
- * @property treatment - The column whose change might cause the effect.
119
- * @property outcome - The column it might move.
120
- * @property confounders - The backdoor set columns to adjust for.
121
- * @property categorical - Which of the confounders hold category codes (one-hot
122
- * encoded by the estimator).
123
- * @property population - Optional row narrowing (AND-ed Slice predicates).
124
- * @property method - Optional estimator override (default: linear regression).
125
- * @property targetUnits - Optional population override (default: everyone).
126
- * @property trim - Optional un-matchable-row trimming (propensity weighting only).
73
+ * `treatment` / `outcome` / `common_causes` / `categorical` are **column names**
74
+ * introspected from the bound dataset's row struct (the `Table` pattern). The
75
+ * `method` / `estimand` advanced choices and the `min_*` guard thresholds are
76
+ * optional developer-defaulted, user-adjustable knobs.
127
77
  */
128
- export const ExperimentSpecType = StructType({
78
+ export const ExperimentConfigType = StructType({
129
79
  treatment: StringType,
130
80
  outcome: StringType,
131
- confounders: ArrayType(StringType),
132
- categorical: ArrayType(StringType),
133
- population: OptionType(ArrayType(Slice.Types.Predicate)),
81
+ common_causes: ArrayType(StringType),
82
+ categorical: OptionType(ArrayType(StringType)),
134
83
  method: OptionType(EstimatorType),
135
- targetUnits: OptionType(TargetUnitsType),
136
- trim: OptionType(TrimType),
84
+ estimand: OptionType(TargetUnitsType),
85
+ refute: OptionType(RefuteSpecType),
86
+ /** Continuous column for the ALE dose-response curve (the "How much?" view). */
87
+ dose_feature: OptionType(StringType),
88
+ min_overlap: OptionType(FloatType),
89
+ min_treatment_variation: OptionType(FloatType),
90
+ bootstrap: OptionType(BootstrapConfigType),
91
+ random_state: OptionType(IntegerType),
137
92
  });
138
93
  // ============================================================================
139
- // Shared a confidence interval.
94
+ // The result the engine returns (= CausalExperimentResultType)
140
95
  // ============================================================================
141
- /**
142
- * A confidence interval. Structurally identical to the causal library's `ci`,
143
- * so it unifies by shape across the package boundary.
144
- *
145
- * @property lower - Lower bound.
146
- * @property upper - Upper bound.
147
- */
148
- export const CiType = StructType({
149
- lower: FloatType,
150
- upper: FloatType,
96
+ /** One confounder's before-adjustment imbalance (categoricals → one row per level). */
97
+ export const BalanceRowType = StructType({
98
+ column: StringType,
99
+ /** The original confounder this row belongs to — equals `column` for a numeric
100
+ * confounder; the base confounder for a one-hot categorical level. */
101
+ base_column: StringType,
102
+ treated_mean: FloatType,
103
+ control_mean: FloatType,
104
+ std_diff: FloatType,
105
+ });
106
+ /** Positivity / common-support diagnostic (binary treatment). */
107
+ export const OverlapDiagnosticType = StructType({
108
+ treated_propensity: VectorType(FloatType),
109
+ control_propensity: VectorType(FloatType),
110
+ common_support_frac: FloatType,
111
+ positivity_ok: BooleanType,
112
+ });
113
+ /** The robustness summary the verdict + trust tab consume. */
114
+ export const RefutationType = StructType({
115
+ /** Effect under a permuted (placebo) treatment — should be ≈ 0. */
116
+ placebo_effect: OptionType(FloatType),
117
+ /** Whether the placebo effect vanished. */
118
+ placebo_passes: OptionType(BooleanType),
119
+ /** Whether a decoy random common cause left the estimate inside its CI. */
120
+ random_cc_within_ci: OptionType(BooleanType),
121
+ /** Mean effect across data subsamples (stability). */
122
+ data_subset_effect: OptionType(FloatType),
123
+ /** Std of the effect across data subsamples. */
124
+ data_subset_std: OptionType(FloatType),
125
+ /** Closed-form E-value — confounder strength needed to explain the effect away. */
126
+ robustness_value: OptionType(FloatType),
127
+ /** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
128
+ sensitivity: OptionType(StructType({
129
+ strengths: VectorType(FloatType),
130
+ effects: VectorType(FloatType),
131
+ })),
132
+ });
133
+ /** A dose-response (ALE) curve of a continuous feature on the outcome. */
134
+ export const DoseResponseType = StructType({
135
+ feature: StringType,
136
+ grid: VectorType(FloatType),
137
+ effect: VectorType(FloatType),
138
+ lower: OptionType(VectorType(FloatType)),
139
+ upper: OptionType(VectorType(FloatType)),
140
+ /** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
141
+ size: VectorType(IntegerType),
151
142
  });
152
- // ============================================================================
153
- // What `estimate` returns — causal quantities packaged for the surface.
154
- // ============================================================================
155
143
  /**
156
- * One confounder's before-adjustment imbalance — the two group means and the
157
- * standardised difference. The renderer derives the bar width, tone and "6.1 vs
158
- * 8.0" label from these numbers.
159
- *
160
- * @property column - The confounder column.
161
- * @property treatedMean - Mean of the column in the treated group.
162
- * @property controlMean - Mean of the column in the control group.
163
- * @property stdDiff - Standardised mean difference (the imbalance magnitude).
144
+ * The honesty verdicta thin tag; the numbers live top-level on the result.
145
+ * Only `not_estimable` carries a human-readable reason.
164
146
  */
165
- export const BalanceRowType = StructType({
166
- column: StringType,
167
- treatedMean: FloatType,
168
- controlMean: FloatType,
169
- stdDiff: FloatType,
147
+ export const ExperimentVerdictType = VariantType({
148
+ causal: NullType,
149
+ modest: NullType,
150
+ adjustment_insufficient: NullType,
151
+ non_identifiable_positivity: NullType,
152
+ not_estimable: StringType,
170
153
  });
171
154
  /**
172
- * The `estimate` answer the adjusted (like-for-like) effect, the naive (raw)
173
- * effect for the sign-flip comparison, the sample accounting, and the
174
- * confounder balance. Every word and colour on the surface is derived from
175
- * these numbers.
176
- *
177
- * @property effect - The adjusted (like-for-like) effect estimate.
178
- * @property ci - Optional confidence interval for `effect`.
179
- * @property naive - The raw (unadjusted) mean difference.
180
- * @property naiveCi - Optional confidence interval for `naive`.
181
- * @property nTotal - Rows in the framed population.
182
- * @property nTreated - Treated rows used.
183
- * @property nControl - Control rows used.
184
- * @property nDropped - Rows dropped by trimming / missing data.
185
- * @property balance - Per-confounder before-adjustment imbalance, most
186
- * imbalanced first.
155
+ * The complete, honest result. `adjusted` is `none` when the engine refuses
156
+ * (positivity / no-variation); the `verdict` tag carries the headline; every
157
+ * word/colour on the surface is derived from these numbers.
187
158
  */
188
159
  export const ExperimentResultType = StructType({
189
- effect: FloatType,
190
- ci: OptionType(CiType),
191
160
  naive: FloatType,
192
- naiveCi: OptionType(CiType),
193
- nTotal: IntegerType,
194
- nTreated: IntegerType,
195
- nControl: IntegerType,
196
- nDropped: IntegerType,
161
+ naive_ci: OptionType(CiType),
162
+ adjusted: OptionType(StructType({ effect: FloatType, ci: OptionType(CiType) })),
163
+ n_total: IntegerType,
164
+ n_treated: IntegerType,
165
+ n_control: IntegerType,
166
+ n_dropped: IntegerType,
197
167
  balance: ArrayType(BalanceRowType),
168
+ overlap: OverlapDiagnosticType,
169
+ refutation: OptionType(RefutationType),
170
+ /** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
171
+ dose_response: OptionType(DoseResponseType),
172
+ verdict: ExperimentVerdictType,
198
173
  });
199
174
  // ============================================================================
200
- // What `refute` returns — the trust checks.
175
+ // Validation-design contract (= Causal.Types.ExperimentDesign*)
176
+ //
177
+ // `Causal.designValidation(data, config, result, design_config)` turns a finished
178
+ // experiment into the recipe for a REAL controlled trial that would confirm the
179
+ // effect — how many units, the split, and which categories to match the groups
180
+ // on — or, when a plain trial can't be run, what to change so one can. There is
181
+ // ONE design family (a randomised controlled trial); the framing, the size
182
+ // `basis`, and the visuals vary with the verdict. The renderer's "Validate" tab
183
+ // paints it from these numbers (KPI + split meter + match chips + power curve).
184
+ // Mirrors `Causal.Types.*` in east-py-datascience — kept in sync by hand.
201
185
  // ============================================================================
202
186
  /**
203
- * Which robustness check a {@link RefuteCheckType} row is. Closed set variant;
204
- * the renderer derives the check's name, description and pass/fail from the kind
205
- * plus the numbers.
206
- *
207
- * @property placebo - Fake treatment — the effect should vanish.
208
- * @property random_common_cause - Inject a random cause — the effect should hold.
209
- * @property data_subset - Re-estimate on subsets — the effect should be stable.
210
- * @property unobserved - Simulated hidden confounder — a sensitivity curve.
187
+ * Why the trial is sized the way it is set from the verdict, so the tab's
188
+ * headline + visuals change with the result rather than reading the same twice.
211
189
  */
212
- export const RefuteKindType = VariantType({
213
- placebo: NullType,
214
- random_common_cause: NullType,
215
- data_subset: NullType,
216
- unobserved: NullType,
190
+ export const DesignBasisType = VariantType({
191
+ /** Clear effect → power the trial to detect the *observed* effect. */
192
+ detect_observed: NullType,
193
+ /** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
194
+ resolve_vs_null: NullType,
195
+ /** A trust check failed → randomise to remove the bias adjustment couldn't. */
196
+ de_bias: NullType,
197
+ /** No overlap → randomise within the comparable range. */
198
+ restrict_to_overlap: NullType,
199
+ /** No control group exists → hold back a random sample next time. */
200
+ create_control: NullType,
217
201
  });
218
- /**
219
- * One robustness check — the real refuter numbers. The renderer turns these
220
- * into the pass/fail row and (for `unobserved`) the sensitivity curve.
221
- *
222
- * @property kind - Which check this is ({@link RefuteKindType}).
223
- * @property estimatedEffect - The original effect being challenged.
224
- * @property newEffects - Effect(s) under the refutation — one entry for
225
- * placebo / random-cause / subset; one per simulated strength for unobserved.
226
- * @property strengths - For `unobserved` only: the simulated confounder
227
- * strengths paired with `newEffects` (the sensitivity-curve x-axis). `none`
228
- * for the single-shot checks.
229
- * @property pValue - Refuter p-value where the check provides one.
230
- */
231
- export const RefuteCheckType = StructType({
232
- kind: RefuteKindType,
233
- estimatedEffect: FloatType,
234
- newEffects: VectorType(FloatType),
235
- strengths: OptionType(VectorType(FloatType)),
236
- pValue: OptionType(FloatType),
202
+ /** One sizing option — a split and the head-count it needs (even split first). */
203
+ export const TrialOptionType = StructType({
204
+ /** Plain label, e.g. "Even split" / "Treat fewer". */
205
+ label: StringType,
206
+ /** Fraction assigned to the treatment (0..1; 0.5 = even). */
207
+ treated_share: FloatType,
208
+ n_treated: IntegerType,
209
+ n_control: IntegerType,
210
+ n_total: IntegerType,
237
211
  });
238
- /**
239
- * The `refute` answer — the battery of robustness checks shown in the "Can we
240
- * trust it?" tab.
241
- *
242
- * @property checks - The checks that were run.
243
- */
244
- export const RefuteResultType = StructType({
245
- checks: ArrayType(RefuteCheckType),
212
+ /** The "chance of detecting it" curve — total head-count → power (0..1). */
213
+ export const PowerCurveType = StructType({
214
+ n: VectorType(IntegerType),
215
+ power: VectorType(FloatType),
246
216
  });
247
- // ============================================================================
248
- // What `dose` returns — the ALE dose-response curve.
249
- // ============================================================================
250
217
  /**
251
- * A per-segment dose-response sub-curve (e.g. one production line). The grid /
252
- * effect / CI vectors mirror the top-level {@link DoseResultType} curve shape.
253
- *
254
- * @property label - Segment label ("Line A", "Acme", …).
255
- * @property grid - Feature grid values.
256
- * @property effect - Centered ALE effect at each grid value.
257
- * @property lower - Optional lower CI at each grid value.
258
- * @property upper - Optional upper CI at each grid value.
218
+ * The validation-trial recipe a randomised controlled trial sized from the
219
+ * observed effect (or the materiality threshold) and the outcome spread, with
220
+ * the groups matched on the confounders that were most imbalanced. Everything
221
+ * the "Validate" tab paints is derived from these fields.
259
222
  */
260
- export const DoseSegmentType = StructType({
261
- label: StringType,
262
- grid: VectorType(FloatType),
263
- effect: VectorType(FloatType),
264
- lower: OptionType(VectorType(FloatType)),
265
- upper: OptionType(VectorType(FloatType)),
223
+ export const ExperimentDesignType = StructType({
224
+ /** The verdict that drove the recommendation (echoed for framing). */
225
+ verdict: ExperimentVerdictType,
226
+ basis: DesignBasisType,
227
+ /** The effect size the trial is powered to detect (observed, or materiality). */
228
+ target_effect: FloatType,
229
+ /** Outcome spread (pooled SD) used to size it. */
230
+ outcome_sd: FloatType,
231
+ target_power: FloatType,
232
+ alpha: FloatType,
233
+ /** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
234
+ current_power: OptionType(FloatType),
235
+ /** Categories both groups must be matched on (the most-imbalanced confounders). */
236
+ match_on: ArrayType(StringType),
237
+ /** Ranked split options (even split first; cost-saving alternates). */
238
+ options: ArrayType(TrialOptionType),
239
+ /** The detect-chance curve for the chart. */
240
+ power_curve: PowerCurveType,
241
+ /** One generated, plain-language sentence framing the recipe. */
242
+ rationale: StringType,
266
243
  });
267
- /**
268
- * The `dose` answer — an ALE dose-response curve for a chosen feature, plus the
269
- * optional per-segment breakdown. The grid / effect / CI / size vectors are
270
- * structurally identical to the causal library's ALE result.
271
- *
272
- * @property feature - The dose feature column.
273
- * @property grid - Feature grid values (interval edges).
274
- * @property effect - Centered ALE effect at each grid value (outcome units).
275
- * @property lower - Optional lower CI at each grid value.
276
- * @property upper - Optional upper CI at each grid value.
277
- * @property size - Number of samples in each grid interval.
278
- * @property segments - Optional per-segment sub-curves ({@link DoseSegmentType}).
279
- */
280
- export const DoseResultType = StructType({
281
- feature: StringType,
282
- grid: VectorType(FloatType),
283
- effect: VectorType(FloatType),
284
- lower: OptionType(VectorType(FloatType)),
285
- upper: OptionType(VectorType(FloatType)),
286
- size: VectorType(IntegerType),
287
- segments: OptionType(ArrayType(DoseSegmentType)),
244
+ /** Optional knobs `Causal.designValidation` accepts (all developer-defaulted). */
245
+ export const DesignConfigType = StructType({
246
+ /** Significance level (default 0.05). */
247
+ alpha: OptionType(FloatType),
248
+ /** Target chance of detecting the effect (default 0.8). */
249
+ target_power: OptionType(FloatType),
250
+ /** Smallest effect worth acting on sizes the trial to this when set / when there's no trustworthy observed effect. */
251
+ materiality: OptionType(FloatType),
252
+ /** Treatment shares to offer as options (default [0.5]). */
253
+ treated_shares: OptionType(ArrayType(FloatType)),
288
254
  });
289
255
  // ============================================================================
290
- // The journal committed experiments.
256
+ // UI-only types (not part of the engine contract)
291
257
  // ============================================================================
292
258
  /**
293
- * A committed experiment in the journal the framed spec + the headline effect
294
- * + who committed it when. The renderer derives the verdict words and colour
295
- * from `effect` / `ci`.
296
- *
297
- * @property spec - The experiment that was committed ({@link ExperimentSpecType}).
298
- * @property effect - The adjusted effect at commit time.
299
- * @property ci - Optional confidence interval at commit time.
300
- * @property committedAt - When it was committed.
301
- * @property committedBy - Who committed it.
259
+ * The UI-side population filter a set of {@link Slice} predicates the Step-4
260
+ * rail edits. It narrows the rows **client-side, before** the `experiment` call,
261
+ * so it is deliberately **not** a field of {@link ExperimentConfigType} (the
262
+ * bound function never sees it; the config stays byte-identical to the causal
263
+ * library's contract). Bound as its own optional staged dataset so a surface can
264
+ * seed / persist / commit the framing filters.
302
265
  */
303
- export const JournalRowType = StructType({
304
- spec: ExperimentSpecType,
305
- effect: FloatType,
306
- ci: OptionType(CiType),
307
- committedAt: DateTimeType,
308
- committedBy: StringType,
309
- });
310
- /** The journal dataset — committed experiments, newest first. */
311
- export const JournalType = ArrayType(JournalRowType);
312
- // ============================================================================
313
- // Optional per-column metadata.
314
- // ============================================================================
266
+ export const PopulationType = ArrayType(Slice.Types.Predicate);
315
267
  /**
316
- * Optional per-column metadata the developer supplies once. Lets the derived
317
- * prose read "worse" instead of "lower" and show friendly labels / units.
318
- * Keyed by column name.
319
- *
320
- * @property label - Friendly display label for the column.
321
- * @property unit - Unit suffix ("MPa", "$", …).
322
- * @property higherIsBetter - Whether a larger value is the good direction —
323
- * flips "lower" → "worse" in the derived words.
268
+ * Optional per-column display metadata the developer supplies once. Keyed by
269
+ * column name. Lets the derived prose read "worse" instead of "lower" and show
270
+ * friendly labels / units.
324
271
  */
325
272
  export const ColumnMetaType = DictType(StringType, StructType({
326
273
  label: OptionType(StringType),
327
274
  unit: OptionType(StringType),
328
275
  higherIsBetter: OptionType(BooleanType),
329
276
  }));
277
+ /**
278
+ * A committed experiment in the journal — the framed config + the verdict +
279
+ * headline effect + who committed it when. The renderer derives the verdict
280
+ * words and colour from `verdict` / `adjusted`.
281
+ */
282
+ export const JournalRowType = StructType({
283
+ config: ExperimentConfigType,
284
+ verdict: ExperimentVerdictType,
285
+ naive: FloatType,
286
+ adjusted: OptionType(FloatType),
287
+ committed_at: DateTimeType,
288
+ committed_by: StringType,
289
+ });
290
+ /** The journal dataset — committed experiments, newest first. */
291
+ export const JournalType = ArrayType(JournalRowType);
330
292
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/experiment/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACH,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,GACb,MAAM,eAAe,CAAC;A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 @@ export { DiffPayloadType, DiffStyleType, } from './diff.js';
36
36
  export { Ontology } from './runtime/ontology.js';
37
37
  export { OntologyPayloadType, OntologyStyleType, NodeKindType, LinkKindType, NodeType, LinkType, OntologyMetadataType, OntologyType, OntologyViewType, } from './ontology.js';
38
38
  // e3 `<Experiment>` tag + its payload/options. The render-contract value types
39
- // (Spec / Result / Refute / Dose / Journal …) are intentionally NOT public
40
- // named exports — reach them via `Experiment.Types.Spec`, `.Result`, … (like
41
- // `Table.Types.*`), since users only touch them to type the bound functions /
42
- // seed result datasets.
39
+ // (Config / Result / DoseResponse / Journal …) are intentionally NOT public
40
+ // named exports — reach them via `Experiment.Types.Config`, `.Result`, … (like
41
+ // `Table.Types.*`), since users only touch them to type the bound `experiment`
42
+ // function / seed result datasets.
43
43
  export { Experiment } from './runtime/experiment.js';
44
44
  export { ExperimentPayloadType, } from './experiment/index.js';
45
45
  // Decision platform types + factory