@elaraai/e3-ui 1.0.12 → 1.0.14
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/dist/src/{data.d.ts → bind/data.d.ts} +7 -0
- package/dist/src/bind/data.d.ts.map +1 -0
- package/dist/src/{data.js → bind/data.js} +7 -0
- package/dist/src/bind/data.js.map +1 -0
- package/dist/src/bind/func.d.ts.map +1 -0
- package/dist/src/bind/func.js.map +1 -0
- package/dist/src/bind/record.d.ts +275 -0
- package/dist/src/bind/record.d.ts.map +1 -0
- package/dist/src/bind/record.js +239 -0
- package/dist/src/bind/record.js.map +1 -0
- package/dist/src/decision/bind.d.ts +1 -1
- package/dist/src/decision/bind.d.ts.map +1 -1
- package/dist/src/decision/bind.js +1 -1
- package/dist/src/decision/bind.js.map +1 -1
- package/dist/src/{diff.d.ts → diff/index.d.ts} +3 -3
- package/dist/src/diff/index.d.ts.map +1 -0
- package/dist/src/{diff.js → diff/index.js} +3 -3
- package/dist/src/diff/index.js.map +1 -0
- package/dist/src/experiment/index.d.ts +379 -325
- package/dist/src/experiment/index.d.ts.map +1 -1
- package/dist/src/experiment/index.js +59 -60
- package/dist/src/experiment/index.js.map +1 -1
- package/dist/src/experiment/types.d.ts +439 -475
- package/dist/src/experiment/types.d.ts.map +1 -1
- package/dist/src/experiment/types.js +218 -256
- package/dist/src/experiment/types.js.map +1 -1
- package/dist/src/index.d.ts +7 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -10
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +7 -6
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +7 -6
- package/dist/src/internal.js.map +1 -1
- package/dist/src/{ontology.d.ts → ontology/index.d.ts} +3 -3
- package/dist/src/ontology/index.d.ts.map +1 -0
- package/dist/src/{ontology.js → ontology/index.js} +3 -3
- package/dist/src/ontology/index.js.map +1 -0
- package/dist/src/runtime/diff.d.ts +1 -1
- package/dist/src/runtime/diff.d.ts.map +1 -1
- package/dist/src/runtime/diff.js +1 -1
- package/dist/src/runtime/diff.js.map +1 -1
- package/dist/src/runtime/ontology.d.ts +1 -1
- package/dist/src/runtime/ontology.d.ts.map +1 -1
- package/dist/src/runtime/ontology.js +1 -1
- package/dist/src/runtime/ontology.js.map +1 -1
- package/dist/src/ui.js +3 -3
- package/dist/src/ui.js.map +1 -1
- package/dist/src/utils/derive.d.ts +29 -0
- package/dist/src/utils/derive.d.ts.map +1 -0
- package/dist/src/utils/derive.js +57 -0
- package/dist/src/utils/derive.js.map +1 -0
- package/dist/src/{manifest.d.ts → utils/manifest.d.ts} +9 -14
- package/dist/src/utils/manifest.d.ts.map +1 -0
- package/dist/src/utils/manifest.js +37 -0
- package/dist/src/utils/manifest.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts.map +1 -0
- package/dist/test/bind/data/data.examples.js.map +1 -0
- package/dist/test/bind/func/func.examples.d.ts.map +1 -0
- package/dist/test/bind/func/func.examples.js.map +1 -0
- package/dist/test/bind/record/record.examples.d.ts +13 -0
- package/dist/test/bind/record/record.examples.d.ts.map +1 -0
- package/dist/test/bind/record/record.examples.js +73 -0
- package/dist/test/bind/record/record.examples.js.map +1 -0
- package/dist/test/experiment/experiment.examples.d.ts +285 -385
- package/dist/test/experiment/experiment.examples.d.ts.map +1 -1
- package/dist/test/experiment/experiment.examples.js +148 -79
- package/dist/test/experiment/experiment.examples.js.map +1 -1
- package/package.json +7 -7
- package/dist/src/data.d.ts.map +0 -1
- package/dist/src/data.js.map +0 -1
- package/dist/src/derive.d.ts +0 -34
- package/dist/src/derive.d.ts.map +0 -1
- package/dist/src/derive.js +0 -86
- package/dist/src/derive.js.map +0 -1
- package/dist/src/diff.d.ts.map +0 -1
- package/dist/src/diff.js.map +0 -1
- package/dist/src/func.d.ts.map +0 -1
- package/dist/src/func.js.map +0 -1
- package/dist/src/manifest.d.ts.map +0 -1
- package/dist/src/manifest.js +0 -53
- package/dist/src/manifest.js.map +0 -1
- package/dist/src/ontology.d.ts.map +0 -1
- package/dist/src/ontology.js.map +0 -1
- package/dist/test/data/data.examples.d.ts.map +0 -1
- package/dist/test/data/data.examples.js.map +0 -1
- package/dist/test/func/func.examples.d.ts.map +0 -1
- package/dist/test/func/func.examples.js.map +0 -1
- /package/dist/src/{func.d.ts → bind/func.d.ts} +0 -0
- /package/dist/src/{func.js → bind/func.js} +0 -0
- /package/dist/test/{data → bind/data}/data.examples.d.ts +0 -0
- /package/dist/test/{data → bind/data}/data.examples.js +0 -0
- /package/dist/test/{func → bind/func}/func.examples.d.ts +0 -0
- /package/dist/test/{func → bind/func}/func.examples.js +0 -0
|
@@ -3,49 +3,32 @@
|
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The `Experiment` render contract
|
|
7
|
-
* component reads and the developer's bound functions return.
|
|
6
|
+
* The `Experiment` render contract.
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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 {
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
23
|
+
import { StructType, VariantType, OptionType, ArrayType, DictType, FloatType, IntegerType, BooleanType, StringType, NullType, DateTimeType, VectorType } from '@elaraai/east';
|
|
24
|
+
/** A confidence interval. */
|
|
25
|
+
export declare const CiType: StructType<{
|
|
26
|
+
readonly lower: FloatType;
|
|
27
|
+
readonly upper: FloatType;
|
|
28
|
+
}>;
|
|
29
|
+
/** Type alias for {@link CiType}. */
|
|
30
|
+
export type CiType = typeof CiType;
|
|
31
|
+
/** Inverse-propensity weighting scheme. */
|
|
49
32
|
export declare const WeightingSchemeType: VariantType<{
|
|
50
33
|
readonly ips_weight: NullType;
|
|
51
34
|
readonly ips_stabilized_weight: NullType;
|
|
@@ -53,16 +36,7 @@ export declare const WeightingSchemeType: VariantType<{
|
|
|
53
36
|
}>;
|
|
54
37
|
/** Type alias for {@link WeightingSchemeType}. */
|
|
55
38
|
export type WeightingSchemeType = typeof WeightingSchemeType;
|
|
56
|
-
/**
|
|
57
|
-
* How the like-for-like comparison is estimated — the user's "method" choice in
|
|
58
|
-
* the Advanced panel. Closed set, so a variant; structurally mirrors the causal
|
|
59
|
-
* estimator vocabulary.
|
|
60
|
-
*
|
|
61
|
-
* @property linear_regression - Regress the outcome on treatment + confounders.
|
|
62
|
-
* @property propensity_score_weighting - Re-weight rows by treatment
|
|
63
|
-
* propensity (binary treatment); carries the optional
|
|
64
|
-
* {@link WeightingSchemeType}.
|
|
65
|
-
*/
|
|
39
|
+
/** Backdoor-adjusted effect estimator. */
|
|
66
40
|
export declare const EstimatorType: VariantType<{
|
|
67
41
|
readonly linear_regression: NullType;
|
|
68
42
|
readonly propensity_score_weighting: StructType<{
|
|
@@ -75,14 +49,7 @@ export declare const EstimatorType: VariantType<{
|
|
|
75
49
|
}>;
|
|
76
50
|
/** Type alias for {@link EstimatorType}. */
|
|
77
51
|
export type EstimatorType = typeof EstimatorType;
|
|
78
|
-
/**
|
|
79
|
-
* Which population the effect is reported for — the user's "who" choice. Closed
|
|
80
|
-
* set, so a variant; structurally mirrors the causal target-units vocabulary.
|
|
81
|
-
*
|
|
82
|
-
* @property ate - Everyone (average treatment effect).
|
|
83
|
-
* @property att - The treated group (average effect on the treated).
|
|
84
|
-
* @property atc - The untreated group (average effect on the controls).
|
|
85
|
-
*/
|
|
52
|
+
/** Population the effect is reported for. */
|
|
86
53
|
export declare const TargetUnitsType: VariantType<{
|
|
87
54
|
readonly ate: NullType;
|
|
88
55
|
readonly att: NullType;
|
|
@@ -90,102 +57,41 @@ export declare const TargetUnitsType: VariantType<{
|
|
|
90
57
|
}>;
|
|
91
58
|
/** Type alias for {@link TargetUnitsType}. */
|
|
92
59
|
export type TargetUnitsType = typeof TargetUnitsType;
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
*/
|
|
102
|
-
export declare const
|
|
103
|
-
|
|
104
|
-
readonly
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
60
|
+
/** Bootstrap confidence-interval configuration. */
|
|
61
|
+
export declare const BootstrapConfigType: StructType<{
|
|
62
|
+
readonly reps: IntegerType;
|
|
63
|
+
readonly cluster_column: OptionType<StringType>;
|
|
64
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
65
|
+
}>;
|
|
66
|
+
/** Type alias for {@link BootstrapConfigType}. */
|
|
67
|
+
export type BootstrapConfigType = typeof BootstrapConfigType;
|
|
68
|
+
/** Which robustness checks to run. */
|
|
69
|
+
export declare const RefuteSpecType: StructType<{
|
|
70
|
+
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
71
|
+
readonly placebo: BooleanType;
|
|
72
|
+
/** Inject an independent random common cause — the effect should hold. */
|
|
73
|
+
readonly random_common_cause: BooleanType;
|
|
74
|
+
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
75
|
+
readonly data_subset: BooleanType;
|
|
76
|
+
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
77
|
+
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
108
78
|
}>;
|
|
109
|
-
/** Type alias for {@link
|
|
110
|
-
export type
|
|
79
|
+
/** Type alias for {@link RefuteSpecType}. */
|
|
80
|
+
export type RefuteSpecType = typeof RefuteSpecType;
|
|
111
81
|
/**
|
|
112
|
-
* The experiment the user framed
|
|
113
|
-
*
|
|
82
|
+
* The experiment the user framed — the staged value the pickers write and
|
|
83
|
+
* **Apply** feeds to the bound `experiment` function.
|
|
114
84
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* choices ({@link EstimatorType}, {@link TargetUnitsType}, {@link TrimType}) are
|
|
120
|
-
* variants. `population` is an optional Slice-style predicate set that narrows
|
|
121
|
-
* the rows before estimating.
|
|
122
|
-
*
|
|
123
|
-
* @property treatment - The column whose change might cause the effect.
|
|
124
|
-
* @property outcome - The column it might move.
|
|
125
|
-
* @property confounders - The backdoor set — columns to adjust for.
|
|
126
|
-
* @property categorical - Which of the confounders hold category codes (one-hot
|
|
127
|
-
* encoded by the estimator).
|
|
128
|
-
* @property population - Optional row narrowing (AND-ed Slice predicates).
|
|
129
|
-
* @property method - Optional estimator override (default: linear regression).
|
|
130
|
-
* @property targetUnits - Optional population override (default: everyone).
|
|
131
|
-
* @property trim - Optional un-matchable-row trimming (propensity weighting only).
|
|
85
|
+
* `treatment` / `outcome` / `common_causes` / `categorical` are **column names**
|
|
86
|
+
* introspected from the bound dataset's row struct (the `Table` pattern). The
|
|
87
|
+
* `method` / `estimand` advanced choices and the `min_*` guard thresholds are
|
|
88
|
+
* optional developer-defaulted, user-adjustable knobs.
|
|
132
89
|
*/
|
|
133
|
-
export declare const
|
|
90
|
+
export declare const ExperimentConfigType: StructType<{
|
|
134
91
|
readonly treatment: StringType;
|
|
135
92
|
readonly outcome: StringType;
|
|
136
|
-
readonly
|
|
137
|
-
readonly categorical: ArrayType<StringType
|
|
138
|
-
readonly population: OptionType<ArrayType<VariantType<{
|
|
139
|
-
readonly string: import("@elaraai/east").StructType<{
|
|
140
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
141
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
142
|
-
readonly eq: import("@elaraai/east").StringType;
|
|
143
|
-
readonly neq: import("@elaraai/east").StringType;
|
|
144
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
145
|
-
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
146
|
-
readonly contains: import("@elaraai/east").StringType;
|
|
147
|
-
readonly matches: import("@elaraai/east").StringType;
|
|
148
|
-
}>;
|
|
149
|
-
}>;
|
|
150
|
-
readonly integer: import("@elaraai/east").StructType<{
|
|
151
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
152
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
153
|
-
readonly eq: import("@elaraai/east").IntegerType;
|
|
154
|
-
readonly neq: import("@elaraai/east").IntegerType;
|
|
155
|
-
readonly lt: import("@elaraai/east").IntegerType;
|
|
156
|
-
readonly lte: import("@elaraai/east").IntegerType;
|
|
157
|
-
readonly gt: import("@elaraai/east").IntegerType;
|
|
158
|
-
readonly gte: import("@elaraai/east").IntegerType;
|
|
159
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
160
|
-
}>;
|
|
161
|
-
}>;
|
|
162
|
-
readonly float: import("@elaraai/east").StructType<{
|
|
163
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
164
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
165
|
-
readonly lt: import("@elaraai/east").FloatType;
|
|
166
|
-
readonly lte: import("@elaraai/east").FloatType;
|
|
167
|
-
readonly gt: import("@elaraai/east").FloatType;
|
|
168
|
-
readonly gte: import("@elaraai/east").FloatType;
|
|
169
|
-
}>;
|
|
170
|
-
}>;
|
|
171
|
-
readonly datetime: import("@elaraai/east").StructType<{
|
|
172
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
173
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
174
|
-
readonly before: import("@elaraai/east").DateTimeType;
|
|
175
|
-
readonly after: import("@elaraai/east").DateTimeType;
|
|
176
|
-
readonly between: import("@elaraai/east").StructType<{
|
|
177
|
-
readonly from: import("@elaraai/east").DateTimeType;
|
|
178
|
-
readonly to: import("@elaraai/east").DateTimeType;
|
|
179
|
-
}>;
|
|
180
|
-
}>;
|
|
181
|
-
}>;
|
|
182
|
-
readonly boolean: import("@elaraai/east").StructType<{
|
|
183
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
184
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
185
|
-
readonly is: import("@elaraai/east").BooleanType;
|
|
186
|
-
}>;
|
|
187
|
-
}>;
|
|
188
|
-
}>>>;
|
|
93
|
+
readonly common_causes: ArrayType<StringType>;
|
|
94
|
+
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
189
95
|
readonly method: OptionType<VariantType<{
|
|
190
96
|
readonly linear_regression: NullType;
|
|
191
97
|
readonly propensity_score_weighting: StructType<{
|
|
@@ -196,277 +102,369 @@ export declare const ExperimentSpecType: StructType<{
|
|
|
196
102
|
}>>;
|
|
197
103
|
}>;
|
|
198
104
|
}>>;
|
|
199
|
-
readonly
|
|
105
|
+
readonly estimand: OptionType<VariantType<{
|
|
200
106
|
readonly ate: NullType;
|
|
201
107
|
readonly att: NullType;
|
|
202
108
|
readonly atc: NullType;
|
|
203
109
|
}>>;
|
|
204
|
-
readonly
|
|
205
|
-
|
|
206
|
-
readonly
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
110
|
+
readonly refute: OptionType<StructType<{
|
|
111
|
+
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
112
|
+
readonly placebo: BooleanType;
|
|
113
|
+
/** Inject an independent random common cause — the effect should hold. */
|
|
114
|
+
readonly random_common_cause: BooleanType;
|
|
115
|
+
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
116
|
+
readonly data_subset: BooleanType;
|
|
117
|
+
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
118
|
+
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
210
119
|
}>>;
|
|
120
|
+
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
121
|
+
readonly dose_feature: OptionType<StringType>;
|
|
122
|
+
readonly min_overlap: OptionType<FloatType>;
|
|
123
|
+
readonly min_treatment_variation: OptionType<FloatType>;
|
|
124
|
+
readonly bootstrap: OptionType<StructType<{
|
|
125
|
+
readonly reps: IntegerType;
|
|
126
|
+
readonly cluster_column: OptionType<StringType>;
|
|
127
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
128
|
+
}>>;
|
|
129
|
+
readonly random_state: OptionType<IntegerType>;
|
|
211
130
|
}>;
|
|
212
|
-
/** Type alias for {@link
|
|
213
|
-
export type
|
|
214
|
-
/**
|
|
215
|
-
* A confidence interval. Structurally identical to the causal library's `ci`,
|
|
216
|
-
* so it unifies by shape across the package boundary.
|
|
217
|
-
*
|
|
218
|
-
* @property lower - Lower bound.
|
|
219
|
-
* @property upper - Upper bound.
|
|
220
|
-
*/
|
|
221
|
-
export declare const CiType: StructType<{
|
|
222
|
-
readonly lower: FloatType;
|
|
223
|
-
readonly upper: FloatType;
|
|
224
|
-
}>;
|
|
225
|
-
/** Type alias for {@link CiType}. */
|
|
226
|
-
export type CiType = typeof CiType;
|
|
227
|
-
/**
|
|
228
|
-
* One confounder's before-adjustment imbalance — the two group means and the
|
|
229
|
-
* standardised difference. The renderer derives the bar width, tone and "6.1 vs
|
|
230
|
-
* 8.0" label from these numbers.
|
|
231
|
-
*
|
|
232
|
-
* @property column - The confounder column.
|
|
233
|
-
* @property treatedMean - Mean of the column in the treated group.
|
|
234
|
-
* @property controlMean - Mean of the column in the control group.
|
|
235
|
-
* @property stdDiff - Standardised mean difference (the imbalance magnitude).
|
|
236
|
-
*/
|
|
131
|
+
/** Type alias for {@link ExperimentConfigType}. */
|
|
132
|
+
export type ExperimentConfigType = typeof ExperimentConfigType;
|
|
133
|
+
/** One confounder's before-adjustment imbalance (categoricals → one row per level). */
|
|
237
134
|
export declare const BalanceRowType: StructType<{
|
|
238
135
|
readonly column: StringType;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
readonly
|
|
136
|
+
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
137
|
+
* confounder; the base confounder for a one-hot categorical level. */
|
|
138
|
+
readonly base_column: StringType;
|
|
139
|
+
readonly treated_mean: FloatType;
|
|
140
|
+
readonly control_mean: FloatType;
|
|
141
|
+
readonly std_diff: FloatType;
|
|
242
142
|
}>;
|
|
243
143
|
/** Type alias for {@link BalanceRowType}. */
|
|
244
144
|
export type BalanceRowType = typeof BalanceRowType;
|
|
145
|
+
/** Positivity / common-support diagnostic (binary treatment). */
|
|
146
|
+
export declare const OverlapDiagnosticType: StructType<{
|
|
147
|
+
readonly treated_propensity: VectorType<FloatType>;
|
|
148
|
+
readonly control_propensity: VectorType<FloatType>;
|
|
149
|
+
readonly common_support_frac: FloatType;
|
|
150
|
+
readonly positivity_ok: BooleanType;
|
|
151
|
+
}>;
|
|
152
|
+
/** Type alias for {@link OverlapDiagnosticType}. */
|
|
153
|
+
export type OverlapDiagnosticType = typeof OverlapDiagnosticType;
|
|
154
|
+
/** The robustness summary the verdict + trust tab consume. */
|
|
155
|
+
export declare const RefutationType: StructType<{
|
|
156
|
+
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
157
|
+
readonly placebo_effect: OptionType<FloatType>;
|
|
158
|
+
/** Whether the placebo effect vanished. */
|
|
159
|
+
readonly placebo_passes: OptionType<BooleanType>;
|
|
160
|
+
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
161
|
+
readonly random_cc_within_ci: OptionType<BooleanType>;
|
|
162
|
+
/** Mean effect across data subsamples (stability). */
|
|
163
|
+
readonly data_subset_effect: OptionType<FloatType>;
|
|
164
|
+
/** Std of the effect across data subsamples. */
|
|
165
|
+
readonly data_subset_std: OptionType<FloatType>;
|
|
166
|
+
/** Closed-form E-value — confounder strength needed to explain the effect away. */
|
|
167
|
+
readonly robustness_value: OptionType<FloatType>;
|
|
168
|
+
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
169
|
+
readonly sensitivity: OptionType<StructType<{
|
|
170
|
+
readonly strengths: VectorType<FloatType>;
|
|
171
|
+
readonly effects: VectorType<FloatType>;
|
|
172
|
+
}>>;
|
|
173
|
+
}>;
|
|
174
|
+
/** Type alias for {@link RefutationType}. */
|
|
175
|
+
export type RefutationType = typeof RefutationType;
|
|
176
|
+
/** A dose-response (ALE) curve of a continuous feature on the outcome. */
|
|
177
|
+
export declare const DoseResponseType: StructType<{
|
|
178
|
+
readonly feature: StringType;
|
|
179
|
+
readonly grid: VectorType<FloatType>;
|
|
180
|
+
readonly effect: VectorType<FloatType>;
|
|
181
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
182
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
183
|
+
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
184
|
+
readonly size: VectorType<IntegerType>;
|
|
185
|
+
}>;
|
|
186
|
+
/** Type alias for {@link DoseResponseType}. */
|
|
187
|
+
export type DoseResponseType = typeof DoseResponseType;
|
|
245
188
|
/**
|
|
246
|
-
* The
|
|
247
|
-
*
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*
|
|
260
|
-
*
|
|
189
|
+
* The honesty verdict — a thin tag; the numbers live top-level on the result.
|
|
190
|
+
* Only `not_estimable` carries a human-readable reason.
|
|
191
|
+
*/
|
|
192
|
+
export declare const ExperimentVerdictType: VariantType<{
|
|
193
|
+
readonly causal: NullType;
|
|
194
|
+
readonly modest: NullType;
|
|
195
|
+
readonly adjustment_insufficient: NullType;
|
|
196
|
+
readonly non_identifiable_positivity: NullType;
|
|
197
|
+
readonly not_estimable: StringType;
|
|
198
|
+
}>;
|
|
199
|
+
/** Type alias for {@link ExperimentVerdictType}. */
|
|
200
|
+
export type ExperimentVerdictType = typeof ExperimentVerdictType;
|
|
201
|
+
/**
|
|
202
|
+
* The complete, honest result. `adjusted` is `none` when the engine refuses
|
|
203
|
+
* (positivity / no-variation); the `verdict` tag carries the headline; every
|
|
204
|
+
* word/colour on the surface is derived from these numbers.
|
|
261
205
|
*/
|
|
262
206
|
export declare const ExperimentResultType: StructType<{
|
|
263
|
-
readonly effect: FloatType;
|
|
264
|
-
readonly ci: OptionType<StructType<{
|
|
265
|
-
readonly lower: FloatType;
|
|
266
|
-
readonly upper: FloatType;
|
|
267
|
-
}>>;
|
|
268
207
|
readonly naive: FloatType;
|
|
269
|
-
readonly
|
|
208
|
+
readonly naive_ci: OptionType<StructType<{
|
|
270
209
|
readonly lower: FloatType;
|
|
271
210
|
readonly upper: FloatType;
|
|
272
211
|
}>>;
|
|
273
|
-
readonly
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
212
|
+
readonly adjusted: OptionType<StructType<{
|
|
213
|
+
readonly effect: FloatType;
|
|
214
|
+
readonly ci: OptionType<StructType<{
|
|
215
|
+
readonly lower: FloatType;
|
|
216
|
+
readonly upper: FloatType;
|
|
217
|
+
}>>;
|
|
218
|
+
}>>;
|
|
219
|
+
readonly n_total: IntegerType;
|
|
220
|
+
readonly n_treated: IntegerType;
|
|
221
|
+
readonly n_control: IntegerType;
|
|
222
|
+
readonly n_dropped: IntegerType;
|
|
277
223
|
readonly balance: ArrayType<StructType<{
|
|
278
224
|
readonly column: StringType;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
readonly
|
|
225
|
+
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
226
|
+
* confounder; the base confounder for a one-hot categorical level. */
|
|
227
|
+
readonly base_column: StringType;
|
|
228
|
+
readonly treated_mean: FloatType;
|
|
229
|
+
readonly control_mean: FloatType;
|
|
230
|
+
readonly std_diff: FloatType;
|
|
282
231
|
}>>;
|
|
232
|
+
readonly overlap: StructType<{
|
|
233
|
+
readonly treated_propensity: VectorType<FloatType>;
|
|
234
|
+
readonly control_propensity: VectorType<FloatType>;
|
|
235
|
+
readonly common_support_frac: FloatType;
|
|
236
|
+
readonly positivity_ok: BooleanType;
|
|
237
|
+
}>;
|
|
238
|
+
readonly refutation: OptionType<StructType<{
|
|
239
|
+
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
240
|
+
readonly placebo_effect: OptionType<FloatType>;
|
|
241
|
+
/** Whether the placebo effect vanished. */
|
|
242
|
+
readonly placebo_passes: OptionType<BooleanType>;
|
|
243
|
+
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
244
|
+
readonly random_cc_within_ci: OptionType<BooleanType>;
|
|
245
|
+
/** Mean effect across data subsamples (stability). */
|
|
246
|
+
readonly data_subset_effect: OptionType<FloatType>;
|
|
247
|
+
/** Std of the effect across data subsamples. */
|
|
248
|
+
readonly data_subset_std: OptionType<FloatType>;
|
|
249
|
+
/** Closed-form E-value — confounder strength needed to explain the effect away. */
|
|
250
|
+
readonly robustness_value: OptionType<FloatType>;
|
|
251
|
+
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
252
|
+
readonly sensitivity: OptionType<StructType<{
|
|
253
|
+
readonly strengths: VectorType<FloatType>;
|
|
254
|
+
readonly effects: VectorType<FloatType>;
|
|
255
|
+
}>>;
|
|
256
|
+
}>>;
|
|
257
|
+
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
258
|
+
readonly dose_response: OptionType<StructType<{
|
|
259
|
+
readonly feature: StringType;
|
|
260
|
+
readonly grid: VectorType<FloatType>;
|
|
261
|
+
readonly effect: VectorType<FloatType>;
|
|
262
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
263
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
264
|
+
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
265
|
+
readonly size: VectorType<IntegerType>;
|
|
266
|
+
}>>;
|
|
267
|
+
readonly verdict: VariantType<{
|
|
268
|
+
readonly causal: NullType;
|
|
269
|
+
readonly modest: NullType;
|
|
270
|
+
readonly adjustment_insufficient: NullType;
|
|
271
|
+
readonly non_identifiable_positivity: NullType;
|
|
272
|
+
readonly not_estimable: StringType;
|
|
273
|
+
}>;
|
|
283
274
|
}>;
|
|
284
275
|
/** Type alias for {@link ExperimentResultType}. */
|
|
285
276
|
export type ExperimentResultType = typeof ExperimentResultType;
|
|
286
277
|
/**
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* plus the numbers.
|
|
290
|
-
*
|
|
291
|
-
* @property placebo - Fake treatment — the effect should vanish.
|
|
292
|
-
* @property random_common_cause - Inject a random cause — the effect should hold.
|
|
293
|
-
* @property data_subset - Re-estimate on subsets — the effect should be stable.
|
|
294
|
-
* @property unobserved - Simulated hidden confounder — a sensitivity curve.
|
|
278
|
+
* Why the trial is sized the way it is — set from the verdict, so the tab's
|
|
279
|
+
* headline + visuals change with the result rather than reading the same twice.
|
|
295
280
|
*/
|
|
296
|
-
export declare const
|
|
297
|
-
|
|
298
|
-
readonly
|
|
299
|
-
|
|
300
|
-
readonly
|
|
281
|
+
export declare const DesignBasisType: VariantType<{
|
|
282
|
+
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
283
|
+
readonly detect_observed: NullType;
|
|
284
|
+
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
285
|
+
readonly resolve_vs_null: NullType;
|
|
286
|
+
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
287
|
+
readonly de_bias: NullType;
|
|
288
|
+
/** No overlap → randomise within the comparable range. */
|
|
289
|
+
readonly restrict_to_overlap: NullType;
|
|
290
|
+
/** No control group exists → hold back a random sample next time. */
|
|
291
|
+
readonly create_control: NullType;
|
|
301
292
|
}>;
|
|
302
|
-
/** Type alias for {@link
|
|
303
|
-
export type
|
|
304
|
-
/**
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
* strengths paired with `newEffects` (the sensitivity-curve x-axis). `none`
|
|
314
|
-
* for the single-shot checks.
|
|
315
|
-
* @property pValue - Refuter p-value where the check provides one.
|
|
316
|
-
*/
|
|
317
|
-
export declare const RefuteCheckType: StructType<{
|
|
318
|
-
readonly kind: VariantType<{
|
|
319
|
-
readonly placebo: NullType;
|
|
320
|
-
readonly random_common_cause: NullType;
|
|
321
|
-
readonly data_subset: NullType;
|
|
322
|
-
readonly unobserved: NullType;
|
|
323
|
-
}>;
|
|
324
|
-
readonly estimatedEffect: FloatType;
|
|
325
|
-
readonly newEffects: VectorType<FloatType>;
|
|
326
|
-
readonly strengths: OptionType<VectorType<FloatType>>;
|
|
327
|
-
readonly pValue: OptionType<FloatType>;
|
|
293
|
+
/** Type alias for {@link DesignBasisType}. */
|
|
294
|
+
export type DesignBasisType = typeof DesignBasisType;
|
|
295
|
+
/** One sizing option — a split and the head-count it needs (even split first). */
|
|
296
|
+
export declare const TrialOptionType: StructType<{
|
|
297
|
+
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
298
|
+
readonly label: StringType;
|
|
299
|
+
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
300
|
+
readonly treated_share: FloatType;
|
|
301
|
+
readonly n_treated: IntegerType;
|
|
302
|
+
readonly n_control: IntegerType;
|
|
303
|
+
readonly n_total: IntegerType;
|
|
328
304
|
}>;
|
|
329
|
-
/** Type alias for {@link
|
|
330
|
-
export type
|
|
305
|
+
/** Type alias for {@link TrialOptionType}. */
|
|
306
|
+
export type TrialOptionType = typeof TrialOptionType;
|
|
307
|
+
/** The "chance of detecting it" curve — total head-count → power (0..1). */
|
|
308
|
+
export declare const PowerCurveType: StructType<{
|
|
309
|
+
readonly n: VectorType<IntegerType>;
|
|
310
|
+
readonly power: VectorType<FloatType>;
|
|
311
|
+
}>;
|
|
312
|
+
/** Type alias for {@link PowerCurveType}. */
|
|
313
|
+
export type PowerCurveType = typeof PowerCurveType;
|
|
331
314
|
/**
|
|
332
|
-
* The
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
315
|
+
* The validation-trial recipe — a randomised controlled trial sized from the
|
|
316
|
+
* observed effect (or the materiality threshold) and the outcome spread, with
|
|
317
|
+
* the groups matched on the confounders that were most imbalanced. Everything
|
|
318
|
+
* the "Validate" tab paints is derived from these fields.
|
|
336
319
|
*/
|
|
337
|
-
export declare const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
readonly
|
|
320
|
+
export declare const ExperimentDesignType: StructType<{
|
|
321
|
+
/** The verdict that drove the recommendation (echoed for framing). */
|
|
322
|
+
readonly verdict: VariantType<{
|
|
323
|
+
readonly causal: NullType;
|
|
324
|
+
readonly modest: NullType;
|
|
325
|
+
readonly adjustment_insufficient: NullType;
|
|
326
|
+
readonly non_identifiable_positivity: NullType;
|
|
327
|
+
readonly not_estimable: StringType;
|
|
328
|
+
}>;
|
|
329
|
+
readonly basis: VariantType<{
|
|
330
|
+
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
331
|
+
readonly detect_observed: NullType;
|
|
332
|
+
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
333
|
+
readonly resolve_vs_null: NullType;
|
|
334
|
+
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
335
|
+
readonly de_bias: NullType;
|
|
336
|
+
/** No overlap → randomise within the comparable range. */
|
|
337
|
+
readonly restrict_to_overlap: NullType;
|
|
338
|
+
/** No control group exists → hold back a random sample next time. */
|
|
339
|
+
readonly create_control: NullType;
|
|
340
|
+
}>;
|
|
341
|
+
/** The effect size the trial is powered to detect (observed, or materiality). */
|
|
342
|
+
readonly target_effect: FloatType;
|
|
343
|
+
/** Outcome spread (pooled SD) used to size it. */
|
|
344
|
+
readonly outcome_sd: FloatType;
|
|
345
|
+
readonly target_power: FloatType;
|
|
346
|
+
readonly alpha: FloatType;
|
|
347
|
+
/** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
|
|
348
|
+
readonly current_power: OptionType<FloatType>;
|
|
349
|
+
/** Categories both groups must be matched on (the most-imbalanced confounders). */
|
|
350
|
+
readonly match_on: ArrayType<StringType>;
|
|
351
|
+
/** Ranked split options (even split first; cost-saving alternates). */
|
|
352
|
+
readonly options: ArrayType<StructType<{
|
|
353
|
+
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
354
|
+
readonly label: StringType;
|
|
355
|
+
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
356
|
+
readonly treated_share: FloatType;
|
|
357
|
+
readonly n_treated: IntegerType;
|
|
358
|
+
readonly n_control: IntegerType;
|
|
359
|
+
readonly n_total: IntegerType;
|
|
349
360
|
}>>;
|
|
361
|
+
/** The detect-chance curve for the chart. */
|
|
362
|
+
readonly power_curve: StructType<{
|
|
363
|
+
readonly n: VectorType<IntegerType>;
|
|
364
|
+
readonly power: VectorType<FloatType>;
|
|
365
|
+
}>;
|
|
366
|
+
/** One generated, plain-language sentence framing the recipe. */
|
|
367
|
+
readonly rationale: StringType;
|
|
368
|
+
}>;
|
|
369
|
+
/** Type alias for {@link ExperimentDesignType}. */
|
|
370
|
+
export type ExperimentDesignType = typeof ExperimentDesignType;
|
|
371
|
+
/** Optional knobs `Causal.designValidation` accepts (all developer-defaulted). */
|
|
372
|
+
export declare const DesignConfigType: StructType<{
|
|
373
|
+
/** Significance level (default 0.05). */
|
|
374
|
+
readonly alpha: OptionType<FloatType>;
|
|
375
|
+
/** Target chance of detecting the effect (default 0.8). */
|
|
376
|
+
readonly target_power: OptionType<FloatType>;
|
|
377
|
+
/** Smallest effect worth acting on — sizes the trial to this when set / when there's no trustworthy observed effect. */
|
|
378
|
+
readonly materiality: OptionType<FloatType>;
|
|
379
|
+
/** Treatment shares to offer as options (default [0.5]). */
|
|
380
|
+
readonly treated_shares: OptionType<ArrayType<FloatType>>;
|
|
350
381
|
}>;
|
|
351
|
-
/** Type alias for {@link
|
|
352
|
-
export type
|
|
382
|
+
/** Type alias for {@link DesignConfigType}. */
|
|
383
|
+
export type DesignConfigType = typeof DesignConfigType;
|
|
353
384
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
* @property lower - Optional lower CI at each grid value.
|
|
361
|
-
* @property upper - Optional upper CI at each grid value.
|
|
385
|
+
* The UI-side population filter — a set of {@link Slice} predicates the Step-4
|
|
386
|
+
* rail edits. It narrows the rows **client-side, before** the `experiment` call,
|
|
387
|
+
* so it is deliberately **not** a field of {@link ExperimentConfigType} (the
|
|
388
|
+
* bound function never sees it; the config stays byte-identical to the causal
|
|
389
|
+
* library's contract). Bound as its own optional staged dataset so a surface can
|
|
390
|
+
* seed / persist / commit the framing filters.
|
|
362
391
|
*/
|
|
363
|
-
export declare const
|
|
364
|
-
readonly
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
392
|
+
export declare const PopulationType: ArrayType<VariantType<{
|
|
393
|
+
readonly string: import("@elaraai/east").StructType<{
|
|
394
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
395
|
+
readonly op: import("@elaraai/east").VariantType<{
|
|
396
|
+
readonly eq: import("@elaraai/east").StringType;
|
|
397
|
+
readonly neq: import("@elaraai/east").StringType;
|
|
398
|
+
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
399
|
+
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
400
|
+
readonly contains: import("@elaraai/east").StringType;
|
|
401
|
+
readonly matches: import("@elaraai/east").StringType;
|
|
402
|
+
}>;
|
|
403
|
+
}>;
|
|
404
|
+
readonly integer: import("@elaraai/east").StructType<{
|
|
405
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
406
|
+
readonly op: import("@elaraai/east").VariantType<{
|
|
407
|
+
readonly eq: import("@elaraai/east").IntegerType;
|
|
408
|
+
readonly neq: import("@elaraai/east").IntegerType;
|
|
409
|
+
readonly lt: import("@elaraai/east").IntegerType;
|
|
410
|
+
readonly lte: import("@elaraai/east").IntegerType;
|
|
411
|
+
readonly gt: import("@elaraai/east").IntegerType;
|
|
412
|
+
readonly gte: import("@elaraai/east").IntegerType;
|
|
413
|
+
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
414
|
+
}>;
|
|
415
|
+
}>;
|
|
416
|
+
readonly float: import("@elaraai/east").StructType<{
|
|
417
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
418
|
+
readonly op: import("@elaraai/east").VariantType<{
|
|
419
|
+
readonly lt: import("@elaraai/east").FloatType;
|
|
420
|
+
readonly lte: import("@elaraai/east").FloatType;
|
|
421
|
+
readonly gt: import("@elaraai/east").FloatType;
|
|
422
|
+
readonly gte: import("@elaraai/east").FloatType;
|
|
423
|
+
}>;
|
|
424
|
+
}>;
|
|
425
|
+
readonly datetime: import("@elaraai/east").StructType<{
|
|
426
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
427
|
+
readonly op: import("@elaraai/east").VariantType<{
|
|
428
|
+
readonly before: import("@elaraai/east").DateTimeType;
|
|
429
|
+
readonly after: import("@elaraai/east").DateTimeType;
|
|
430
|
+
readonly between: import("@elaraai/east").StructType<{
|
|
431
|
+
readonly from: import("@elaraai/east").DateTimeType;
|
|
432
|
+
readonly to: import("@elaraai/east").DateTimeType;
|
|
433
|
+
}>;
|
|
434
|
+
}>;
|
|
435
|
+
}>;
|
|
436
|
+
readonly boolean: import("@elaraai/east").StructType<{
|
|
437
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
438
|
+
readonly op: import("@elaraai/east").VariantType<{
|
|
439
|
+
readonly is: import("@elaraai/east").BooleanType;
|
|
440
|
+
}>;
|
|
441
|
+
}>;
|
|
442
|
+
}>>;
|
|
443
|
+
/** Type alias for {@link PopulationType}. */
|
|
444
|
+
export type PopulationType = typeof PopulationType;
|
|
372
445
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* @property feature - The dose feature column.
|
|
378
|
-
* @property grid - Feature grid values (interval edges).
|
|
379
|
-
* @property effect - Centered ALE effect at each grid value (outcome units).
|
|
380
|
-
* @property lower - Optional lower CI at each grid value.
|
|
381
|
-
* @property upper - Optional upper CI at each grid value.
|
|
382
|
-
* @property size - Number of samples in each grid interval.
|
|
383
|
-
* @property segments - Optional per-segment sub-curves ({@link DoseSegmentType}).
|
|
446
|
+
* Optional per-column display metadata the developer supplies once. Keyed by
|
|
447
|
+
* column name. Lets the derived prose read "worse" instead of "lower" and show
|
|
448
|
+
* friendly labels / units.
|
|
384
449
|
*/
|
|
385
|
-
export declare const
|
|
386
|
-
readonly
|
|
387
|
-
readonly
|
|
388
|
-
readonly
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
readonly segments: OptionType<ArrayType<StructType<{
|
|
393
|
-
readonly label: StringType;
|
|
394
|
-
readonly grid: VectorType<FloatType>;
|
|
395
|
-
readonly effect: VectorType<FloatType>;
|
|
396
|
-
readonly lower: OptionType<VectorType<FloatType>>;
|
|
397
|
-
readonly upper: OptionType<VectorType<FloatType>>;
|
|
398
|
-
}>>>;
|
|
399
|
-
}>;
|
|
400
|
-
/** Type alias for {@link DoseResultType}. */
|
|
401
|
-
export type DoseResultType = typeof DoseResultType;
|
|
450
|
+
export declare const ColumnMetaType: DictType<StringType, StructType<{
|
|
451
|
+
readonly label: OptionType<StringType>;
|
|
452
|
+
readonly unit: OptionType<StringType>;
|
|
453
|
+
readonly higherIsBetter: OptionType<BooleanType>;
|
|
454
|
+
}>>;
|
|
455
|
+
/** Type alias for {@link ColumnMetaType}. */
|
|
456
|
+
export type ColumnMetaType = typeof ColumnMetaType;
|
|
402
457
|
/**
|
|
403
|
-
* A committed experiment in the journal — the framed
|
|
404
|
-
* + who committed it when. The renderer derives the verdict
|
|
405
|
-
* from `
|
|
406
|
-
*
|
|
407
|
-
* @property spec - The experiment that was committed ({@link ExperimentSpecType}).
|
|
408
|
-
* @property effect - The adjusted effect at commit time.
|
|
409
|
-
* @property ci - Optional confidence interval at commit time.
|
|
410
|
-
* @property committedAt - When it was committed.
|
|
411
|
-
* @property committedBy - Who committed it.
|
|
458
|
+
* A committed experiment in the journal — the framed config + the verdict +
|
|
459
|
+
* headline effect + who committed it when. The renderer derives the verdict
|
|
460
|
+
* words and colour from `verdict` / `adjusted`.
|
|
412
461
|
*/
|
|
413
462
|
export declare const JournalRowType: StructType<{
|
|
414
|
-
readonly
|
|
463
|
+
readonly config: StructType<{
|
|
415
464
|
readonly treatment: StringType;
|
|
416
465
|
readonly outcome: StringType;
|
|
417
|
-
readonly
|
|
418
|
-
readonly categorical: ArrayType<StringType
|
|
419
|
-
readonly population: OptionType<ArrayType<VariantType<{
|
|
420
|
-
readonly string: import("@elaraai/east").StructType<{
|
|
421
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
422
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
423
|
-
readonly eq: import("@elaraai/east").StringType;
|
|
424
|
-
readonly neq: import("@elaraai/east").StringType;
|
|
425
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
426
|
-
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
427
|
-
readonly contains: import("@elaraai/east").StringType;
|
|
428
|
-
readonly matches: import("@elaraai/east").StringType;
|
|
429
|
-
}>;
|
|
430
|
-
}>;
|
|
431
|
-
readonly integer: import("@elaraai/east").StructType<{
|
|
432
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
433
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
434
|
-
readonly eq: import("@elaraai/east").IntegerType;
|
|
435
|
-
readonly neq: import("@elaraai/east").IntegerType;
|
|
436
|
-
readonly lt: import("@elaraai/east").IntegerType;
|
|
437
|
-
readonly lte: import("@elaraai/east").IntegerType;
|
|
438
|
-
readonly gt: import("@elaraai/east").IntegerType;
|
|
439
|
-
readonly gte: import("@elaraai/east").IntegerType;
|
|
440
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
441
|
-
}>;
|
|
442
|
-
}>;
|
|
443
|
-
readonly float: import("@elaraai/east").StructType<{
|
|
444
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
445
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
446
|
-
readonly lt: import("@elaraai/east").FloatType;
|
|
447
|
-
readonly lte: import("@elaraai/east").FloatType;
|
|
448
|
-
readonly gt: import("@elaraai/east").FloatType;
|
|
449
|
-
readonly gte: import("@elaraai/east").FloatType;
|
|
450
|
-
}>;
|
|
451
|
-
}>;
|
|
452
|
-
readonly datetime: import("@elaraai/east").StructType<{
|
|
453
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
454
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
455
|
-
readonly before: import("@elaraai/east").DateTimeType;
|
|
456
|
-
readonly after: import("@elaraai/east").DateTimeType;
|
|
457
|
-
readonly between: import("@elaraai/east").StructType<{
|
|
458
|
-
readonly from: import("@elaraai/east").DateTimeType;
|
|
459
|
-
readonly to: import("@elaraai/east").DateTimeType;
|
|
460
|
-
}>;
|
|
461
|
-
}>;
|
|
462
|
-
}>;
|
|
463
|
-
readonly boolean: import("@elaraai/east").StructType<{
|
|
464
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
465
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
466
|
-
readonly is: import("@elaraai/east").BooleanType;
|
|
467
|
-
}>;
|
|
468
|
-
}>;
|
|
469
|
-
}>>>;
|
|
466
|
+
readonly common_causes: ArrayType<StringType>;
|
|
467
|
+
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
470
468
|
readonly method: OptionType<VariantType<{
|
|
471
469
|
readonly linear_regression: NullType;
|
|
472
470
|
readonly propensity_score_weighting: StructType<{
|
|
@@ -477,87 +475,53 @@ export declare const JournalRowType: StructType<{
|
|
|
477
475
|
}>>;
|
|
478
476
|
}>;
|
|
479
477
|
}>>;
|
|
480
|
-
readonly
|
|
478
|
+
readonly estimand: OptionType<VariantType<{
|
|
481
479
|
readonly ate: NullType;
|
|
482
480
|
readonly att: NullType;
|
|
483
481
|
readonly atc: NullType;
|
|
484
482
|
}>>;
|
|
485
|
-
readonly
|
|
486
|
-
|
|
487
|
-
readonly
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
483
|
+
readonly refute: OptionType<StructType<{
|
|
484
|
+
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
485
|
+
readonly placebo: BooleanType;
|
|
486
|
+
/** Inject an independent random common cause — the effect should hold. */
|
|
487
|
+
readonly random_common_cause: BooleanType;
|
|
488
|
+
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
489
|
+
readonly data_subset: BooleanType;
|
|
490
|
+
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
491
|
+
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
491
492
|
}>>;
|
|
493
|
+
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
494
|
+
readonly dose_feature: OptionType<StringType>;
|
|
495
|
+
readonly min_overlap: OptionType<FloatType>;
|
|
496
|
+
readonly min_treatment_variation: OptionType<FloatType>;
|
|
497
|
+
readonly bootstrap: OptionType<StructType<{
|
|
498
|
+
readonly reps: IntegerType;
|
|
499
|
+
readonly cluster_column: OptionType<StringType>;
|
|
500
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
501
|
+
}>>;
|
|
502
|
+
readonly random_state: OptionType<IntegerType>;
|
|
492
503
|
}>;
|
|
493
|
-
readonly
|
|
494
|
-
|
|
495
|
-
readonly
|
|
496
|
-
readonly
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
504
|
+
readonly verdict: VariantType<{
|
|
505
|
+
readonly causal: NullType;
|
|
506
|
+
readonly modest: NullType;
|
|
507
|
+
readonly adjustment_insufficient: NullType;
|
|
508
|
+
readonly non_identifiable_positivity: NullType;
|
|
509
|
+
readonly not_estimable: StringType;
|
|
510
|
+
}>;
|
|
511
|
+
readonly naive: FloatType;
|
|
512
|
+
readonly adjusted: OptionType<FloatType>;
|
|
513
|
+
readonly committed_at: DateTimeType;
|
|
514
|
+
readonly committed_by: StringType;
|
|
500
515
|
}>;
|
|
501
516
|
/** Type alias for {@link JournalRowType}. */
|
|
502
517
|
export type JournalRowType = typeof JournalRowType;
|
|
503
518
|
/** The journal dataset — committed experiments, newest first. */
|
|
504
519
|
export declare const JournalType: ArrayType<StructType<{
|
|
505
|
-
readonly
|
|
520
|
+
readonly config: StructType<{
|
|
506
521
|
readonly treatment: StringType;
|
|
507
522
|
readonly outcome: StringType;
|
|
508
|
-
readonly
|
|
509
|
-
readonly categorical: ArrayType<StringType
|
|
510
|
-
readonly population: OptionType<ArrayType<VariantType<{
|
|
511
|
-
readonly string: import("@elaraai/east").StructType<{
|
|
512
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
513
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
514
|
-
readonly eq: import("@elaraai/east").StringType;
|
|
515
|
-
readonly neq: import("@elaraai/east").StringType;
|
|
516
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
517
|
-
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
518
|
-
readonly contains: import("@elaraai/east").StringType;
|
|
519
|
-
readonly matches: import("@elaraai/east").StringType;
|
|
520
|
-
}>;
|
|
521
|
-
}>;
|
|
522
|
-
readonly integer: import("@elaraai/east").StructType<{
|
|
523
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
524
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
525
|
-
readonly eq: import("@elaraai/east").IntegerType;
|
|
526
|
-
readonly neq: import("@elaraai/east").IntegerType;
|
|
527
|
-
readonly lt: import("@elaraai/east").IntegerType;
|
|
528
|
-
readonly lte: import("@elaraai/east").IntegerType;
|
|
529
|
-
readonly gt: import("@elaraai/east").IntegerType;
|
|
530
|
-
readonly gte: import("@elaraai/east").IntegerType;
|
|
531
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
532
|
-
}>;
|
|
533
|
-
}>;
|
|
534
|
-
readonly float: import("@elaraai/east").StructType<{
|
|
535
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
536
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
537
|
-
readonly lt: import("@elaraai/east").FloatType;
|
|
538
|
-
readonly lte: import("@elaraai/east").FloatType;
|
|
539
|
-
readonly gt: import("@elaraai/east").FloatType;
|
|
540
|
-
readonly gte: import("@elaraai/east").FloatType;
|
|
541
|
-
}>;
|
|
542
|
-
}>;
|
|
543
|
-
readonly datetime: import("@elaraai/east").StructType<{
|
|
544
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
545
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
546
|
-
readonly before: import("@elaraai/east").DateTimeType;
|
|
547
|
-
readonly after: import("@elaraai/east").DateTimeType;
|
|
548
|
-
readonly between: import("@elaraai/east").StructType<{
|
|
549
|
-
readonly from: import("@elaraai/east").DateTimeType;
|
|
550
|
-
readonly to: import("@elaraai/east").DateTimeType;
|
|
551
|
-
}>;
|
|
552
|
-
}>;
|
|
553
|
-
}>;
|
|
554
|
-
readonly boolean: import("@elaraai/east").StructType<{
|
|
555
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
556
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
557
|
-
readonly is: import("@elaraai/east").BooleanType;
|
|
558
|
-
}>;
|
|
559
|
-
}>;
|
|
560
|
-
}>>>;
|
|
523
|
+
readonly common_causes: ArrayType<StringType>;
|
|
524
|
+
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
561
525
|
readonly method: OptionType<VariantType<{
|
|
562
526
|
readonly linear_regression: NullType;
|
|
563
527
|
readonly propensity_score_weighting: StructType<{
|
|
@@ -568,44 +532,44 @@ export declare const JournalType: ArrayType<StructType<{
|
|
|
568
532
|
}>>;
|
|
569
533
|
}>;
|
|
570
534
|
}>>;
|
|
571
|
-
readonly
|
|
535
|
+
readonly estimand: OptionType<VariantType<{
|
|
572
536
|
readonly ate: NullType;
|
|
573
537
|
readonly att: NullType;
|
|
574
538
|
readonly atc: NullType;
|
|
575
539
|
}>>;
|
|
576
|
-
readonly
|
|
577
|
-
|
|
578
|
-
readonly
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
540
|
+
readonly refute: OptionType<StructType<{
|
|
541
|
+
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
542
|
+
readonly placebo: BooleanType;
|
|
543
|
+
/** Inject an independent random common cause — the effect should hold. */
|
|
544
|
+
readonly random_common_cause: BooleanType;
|
|
545
|
+
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
546
|
+
readonly data_subset: BooleanType;
|
|
547
|
+
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
548
|
+
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
549
|
+
}>>;
|
|
550
|
+
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
551
|
+
readonly dose_feature: OptionType<StringType>;
|
|
552
|
+
readonly min_overlap: OptionType<FloatType>;
|
|
553
|
+
readonly min_treatment_variation: OptionType<FloatType>;
|
|
554
|
+
readonly bootstrap: OptionType<StructType<{
|
|
555
|
+
readonly reps: IntegerType;
|
|
556
|
+
readonly cluster_column: OptionType<StringType>;
|
|
557
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
582
558
|
}>>;
|
|
559
|
+
readonly random_state: OptionType<IntegerType>;
|
|
583
560
|
}>;
|
|
584
|
-
readonly
|
|
585
|
-
|
|
586
|
-
readonly
|
|
587
|
-
readonly
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
561
|
+
readonly verdict: VariantType<{
|
|
562
|
+
readonly causal: NullType;
|
|
563
|
+
readonly modest: NullType;
|
|
564
|
+
readonly adjustment_insufficient: NullType;
|
|
565
|
+
readonly non_identifiable_positivity: NullType;
|
|
566
|
+
readonly not_estimable: StringType;
|
|
567
|
+
}>;
|
|
568
|
+
readonly naive: FloatType;
|
|
569
|
+
readonly adjusted: OptionType<FloatType>;
|
|
570
|
+
readonly committed_at: DateTimeType;
|
|
571
|
+
readonly committed_by: StringType;
|
|
591
572
|
}>>;
|
|
592
573
|
/** Type alias for {@link JournalType}. */
|
|
593
574
|
export type JournalType = typeof JournalType;
|
|
594
|
-
/**
|
|
595
|
-
* Optional per-column metadata the developer supplies once. Lets the derived
|
|
596
|
-
* prose read "worse" instead of "lower" and show friendly labels / units.
|
|
597
|
-
* Keyed by column name.
|
|
598
|
-
*
|
|
599
|
-
* @property label - Friendly display label for the column.
|
|
600
|
-
* @property unit - Unit suffix ("MPa", "$", …).
|
|
601
|
-
* @property higherIsBetter - Whether a larger value is the good direction —
|
|
602
|
-
* flips "lower" → "worse" in the derived words.
|
|
603
|
-
*/
|
|
604
|
-
export declare const ColumnMetaType: DictType<StringType, StructType<{
|
|
605
|
-
readonly label: OptionType<StringType>;
|
|
606
|
-
readonly unit: OptionType<StringType>;
|
|
607
|
-
readonly higherIsBetter: OptionType<BooleanType>;
|
|
608
|
-
}>>;
|
|
609
|
-
/** Type alias for {@link ColumnMetaType}. */
|
|
610
|
-
export type ColumnMetaType = typeof ColumnMetaType;
|
|
611
575
|
//# sourceMappingURL=types.d.ts.map
|