Skip to content

ump_spec.models.experiment

module ump-spec

Test plans and results (spec §9, EMA guide §5).

class

class PowerAnalysis(StrictModel)

Fields

NameTypeDefaultDescription
mdefloat | NoneNone
mde_quantileLiteral['t', 'z']'t'
assurancefloat | NoneNone
assurance_floorProposedProposed(value=0.8, source='§9')
power_at_q25float | NoneNone
sigma_expfloat | NoneNone
n_geosint | NoneNone
duration_weeksint | NoneNone
carryover_floor_weeksint | NoneNone
design_effectfloat | NoneNone
alphafloat | NoneNoneTwo-sided alpha recorded on the plan (§9; proposed default 0.10).
powerfloat | NoneNonePower recorded on the plan (§9; proposed default 0.8).
sesoifloat | NoneNoneSmallest effect of interest (§9).
methodstr'EMA eq. 3/15/16'Formula used.

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 29

class

class Preregistration(StrictModel)

Fields

NameTypeDefaultDescription
lockedboolFalse
locked_atdatetime | NoneNone
primary_metricstr | NoneNone
analysis_methodstr | NoneNone
decision_rulestr | NoneNone
hashstr | NoneNoneContent hash of the locked plan snapshot.

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 51

class

class PlaceboCalibration(StrictModel)

Fields

NameTypeDefaultDescription
doneboolFalse
null_windowsint | NoneNone
fprfloat | NoneNone

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 60

class

class TestPlan(ArtifactDoc)

Fields

NameTypeDefaultDescription
client_idstr | NoneNone
questionstr
decision_informedstr | NoneNone
channelstr
primary_metricstr'revenue'
estimandEstimand
designDesign'matched_markets'
estimatorEstimator'did'
admissibility_classAdmissibilityClass'A'
treatment_geoslist[str]list()
control_geoslist[str]list()
buffer_geoslist[str]list()
spillover_designstr | NoneNone
planned_spendfloat | NoneNone
armslist[str]list()
powerPowerAnalysisPowerAnalysis()
placeboPlaceboCalibrationPlaceboCalibration()
preregistrationPreregistrationPreregistration()
startdate | NoneNone
enddate | NoneNone
sized_from_model_idstr | NoneNone
eigfloat | NoneNone
evoiShownNumber | NoneNone
imported_fromdict[str, Any] | NoneNone
statusLiteral['draft', 'locked', 'running', 'readout']'draft'
design_noteslist[dict[str, Any] | str] | NoneNoneNotes from the design step. Written by experiments (workflows.py) and Newton’s actor.
prior_sourcedict[str, Any] | NoneNonePrior used for power: source, mean, sd. Written by experiments (workflows.py) and Newton’s actor.
national_auction_exposurebool | NoneNoneTrue when the channel buys in a national auction (spillover risk). Written by experiments (workflows.py) and Newton’s actor.
priority_snapshot_idstr | NoneNonePriority snapshot the plan came from. Written by experiments (workflows.py) and Newton’s actor.
spend_changefloat | NoneNonePlanned relative spend change. Written by experiments (workflows.py) and Newton’s actor.
syntheticbool | NoneNoneTrue for synthetic (seeded) data. Written by experiments (workflows.py) and Newton’s actor.
design_enginestr | NoneNoneWhat computed the design. Written by experiments (workflows.py) and Newton’s actor.
mde_showndict[str, Any] | NoneNoneMinimum detectable effect as a ShownNumber. Written by experiments (workflows.py) and Newton’s actor.
fallbackslist[Any] | NoneNoneFallback entries. Written by experiments (workflows.py) and Newton’s actor.
noteslist[dict[str, Any] | str] | NoneNoneNotes (code, severity, message). Written by experiments (workflows.py) and Newton’s actor.
drafted_bystr | NoneNoneAgent principal that drafted the plan. Written by experiments (workflows.py) and Newton’s actor.
newton_sessionstr | NoneNoneNewton session that drafted this plan. Written by experiments (workflows.py) and Newton’s actor.
reader_findingslist[str] | NoneNoneReader finding ids the actor drew on (§17). Written by experiments (workflows.py) and Newton’s actor.
reader_findings_untrustedlist[str] | NoneNoneReader finding ids marked untrusted text (§17). Written by experiments (workflows.py) and Newton’s actor.
injection_flagged_findingslist[str] | NoneNoneReader findings flagged as possible prompt injection (§17). Written by experiments (workflows.py) and Newton’s actor.

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 66

class

class TestResult(ArtifactDoc)

Fields

NameTypeDefaultDescription
client_idstr | NoneNone
metric_familystr | NoneNoneLegacy top-level metric family (sales_return, brand_awareness, …); the estimand’s own metric_family is preferred. A test result is judged on its estimand; kept for older writers (notebook 13).
plan_idstr | NoneNone
channelstr
admissibility_classAdmissibilityClass
methodstrDiD, TBR, SC, trimmed_match, ITT, CACE, platform_reported, …
estimandEstimand
applies_toAppliesToAppliesTo()
liftShownNumber | NoneNone
iroasShownNumber | NoneNone
incremental_kpiShownNumber | NoneNone
outcomeOutcome'inconclusive'
largest_effect_ruled_outfloat | NoneNone
preregisteredboolFalse
contaminatedboolFalse
spillover_buffer_shiftboolFalse
duration_weeksint | NoneNone
carryover_floor_weeksint | NoneNone
flight_startdate | NoneNone
flight_enddate | NoneNone
use_by_datedate | NoneNone
half_life_sourceLiteral['measured', 'media_default']'media_default'
validity_flagLiteral['active', 'superseded', 'contaminated', 'under_review']'active'
provenance_tierLiteral['own-experimental', 'cross-brand-experimental', 'cross-brand-MMM', 'third-party-syndicated', 'platform-reported']'own-experimental'
absorbed_bystr | NoneNoneCalibrated refit id that absorbed this readout.
checksdict[str, Any]dict()
pointfloat | NoneNoneConvenience copy of iROAS point.
intervalInterval | NoneNone
model_intervalInterval | NoneNoneThe recommending model’s pre-test interval (90% by default) for the same estimand, quoted before the flight. The readout coverage check (§25.5) scores the readout against it.
model_pointfloat | NoneNoneThe recommending model’s pre-test point.
model_interval_source_idstr | NoneNoneModel artifact id that quoted model_interval (usually the plan’s sized_from).
panel_idstr | NoneNonePanel the readout was computed on. Written by experiments (workflows.py, seed.py) and Newton’s seed.
plan_design_hashstr | NoneNoneHash of the locked plan design. Written by experiments (workflows.py, seed.py) and Newton’s seed.
readout_sourcestr | NoneNoneWhere the readout came from: adapter or local. Written by experiments (workflows.py, seed.py) and Newton’s seed.
sourcestr | NoneNoneSource of an imported result. Written by experiments (workflows.py, seed.py) and Newton’s seed.
syntheticbool | NoneNoneTrue for synthetic (seeded) data. Written by experiments (workflows.py, seed.py) and Newton’s seed.
seed_tagstr | NoneNoneSeed label (Newton seed data). Written by experiments (workflows.py, seed.py) and Newton’s seed.
noteslist[dict[str, Any] | str] | NoneNoneNotes (code, severity, gate, message). Written by experiments (workflows.py, seed.py) and Newton’s seed.

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 151

class

class PrioritySnapshot(ArtifactDoc)

§11 test prioritisation snapshot: model version, joint draws used, scores, the kept portfolio (P1 cost-scaled greedy on EIG vs P2 best single test), alternatives by joint EVOI and the reason for any override. Briefs MUST NOT claim the (1 - 1/e) bound for EVOI or budget-constrained selection, so guarantee_note states what is (and is not) guaranteed. Signed off by the measurement lead.

Fields

NameTypeDefaultDescription
client_idstr | NoneNone
model_idstr | NoneNone
model_versionint | NoneNone
joint_draws_usedboolFalse
n_drawsint | NoneNone
dependenceAnyNone
kpistr | NoneNone
currencystr | NoneNone
budgetAnyNone
candidateslist[dict[str, Any]]list()Candidate tests with eig, cost, eig_per_dollar, evoi.
clustersAnyNone
p1list[str]list()Cost-scaled greedy portfolio on EIG.
p2list[str]list()Single most informative affordable test.
keptstr | NoneNoneWhich of P1 and P2 was kept (higher EIG).
kept_portfoliodict[str, Any] | NoneNone
alternativeslist[dict[str, Any]]list()
override_neededboolFalse
override_reasonstr | NoneNone
choicedict[str, Any] | NoneNoneMeasurement lead’s logged choice: {portfolio, reason, by, at}.
guarantee_notestr | NoneNone
divisorsdict[str, float] | NoneNone§11: each score term’s maximum over the candidate set, used as its divisor.
eig_estimatorstr | NoneNone§11: the EIG estimator used.
eig_mc_sefloat | NoneNone§11: Monte Carlo SE of the EIG estimate.
guaranteeLiteral['eig_constant_factor', 'none'] | NoneNone§11: none comes with note NO_GUARANTEE. Never covers EVOI.
fallbackslist[dict[str, Any]]list()
noteslist[dict[str, Any]]list()
decision_ruledict[str, Any] | NoneNoneDecision rule the snapshot ranks against. Written by experiments (prioritise.py).
weightsdict[str, Any] | NoneNoneRanking weights (proposed). Written by experiments (prioritise.py).
cluster_thresholddict[str, Any] | NoneNoneClustering threshold (proposed). Written by experiments (prioritise.py).
assumptionslist[Any] | NoneNoneAssumed values, each labelled. Written by experiments (prioritise.py).

Source: packages/ump-spec/src/ump_spec/models/experiment.py, line 223

NameTypeValueDescription
AdmissibilityClassLiteral['A', 'B', 'C', 'D', 'E']
ADMISSIBILITYdict[str, dict[str, Any]]{'A': {'name': 'own randomised holdout', 'calibrates': True, 'discount': 'non...G-EXP-05: only A to C calibrate incrementality. E feeds the brand family only.
DesignLiteral['matched_markets', 'randomised_geos', 'user_holdout', 'ghost_ads', 'p...
EstimatorLiteral['trimmed_match', 'augmented_synthetic_control', 'tbr', 'did', 'itt', ...
OutcomeLiteral['positive', 'negative', 'no_detectable_effect', 'inconclusive']