experiments

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-experiments"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/6af814d4-70c1-4363-8381-689a51668c4d/social-card.svg?v=3e7ae33eec8b" alt="experiments" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/seriesScope experiment:read

Cumulative results as of the end of each day since start (primary metric unless `metric` is given).

Parameters

project_idstringpathrequired
idstringpathrequired
metricstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/series"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "metric": "string",
  "points": [
    {
      "as_of": "2024-01-01T00:00:00Z",
      "metric": {
        "cuped_theta": 0,
        "cuped_thetas": [
          0
        ],
        "guardrail": "ok",
        "id": "string",
        "name": "string",
        "role": "primary",
        "variance_reduction": 0,
        "variants": [
          {
            "chance_to_win": 0,
            "ci_high": 0,
            "ci_low": 0,
            "conversions": 0,
            "diff": 0,
            "expected_loss": 0,
            "exposed_units": 0,
            "harm_p_value": 0,
            "is_control": true,
            "lift_ci_high": 0,
            "lift_ci_low": 0,
            "mean": 0,
            "note": "string",
            "p_adjusted": 0,
            "p_value": 0,
            "relative_lift": 0,
            "significant": true,
            "units": 0,
            "variant": "string"
          }
        ]
      }
    }
  ]
}
Schema
metricstringrequired
pointsSeriesPoint[]required
Show child parameters
as_ofstringrequired
metricMetricResult
Show child parameters
cuped_thetanumber
cuped_thetasnumber[]required
One slope per covariate when CUPED used several (the first is the metric's own pre-period).
guardrailGuardrailStatus
idstringrequired
namestringrequired
rolestringrequired
primary | secondary | guardrail
variance_reductionnumber
variantsVariantResult[]required
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/slicesScope experiment:read

The metric's per-variant results in each slice of `dimension` and Cochran's Q across slices.

Parameters

project_idstringpathrequired
idstringpathrequired
dimensionstringqueryrequired
metricstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/results/slices?dimension=<dimension>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "dimension": "string",
  "heterogeneity": [
    {
      "df": 0,
      "flagged": true,
      "p_value": 0,
      "pooled": 0,
      "q": 0,
      "slices_used": 0,
      "variant": "string"
    }
  ],
  "metric": "string",
  "slices": [
    {
      "segment": "string",
      "units": 0,
      "variants": [
        {
          "chance_to_win": 0,
          "ci_high": 0,
          "ci_low": 0,
          "conversions": 0,
          "diff": 0,
          "expected_loss": 0,
          "exposed_units": 0,
          "harm_p_value": 0,
          "is_control": true,
          "lift_ci_high": 0,
          "lift_ci_low": 0,
          "mean": 0,
          "note": "string",
          "p_adjusted": 0,
          "p_value": 0,
          "relative_lift": 0,
          "significant": true,
          "units": 0,
          "variant": "string"
        }
      ]
    }
  ]
}
Schema
dimensionstringrequired
heterogeneityVariantHeterogeneity[]required
Per variant: is the effect the same in every slice?
Show child parameters
dfnumberrequired
flaggedbooleanrequired
p_value < alpha: the effect differs between slices.
p_valuenumberrequired
poolednumberrequired
Inverse-variance weighted effect across slices.
qnumberrequired
slices_usedintegerrequired
Slices that entered the test.
variantstringrequired
metricstringrequired
slicesSlice[]required
Show child parameters
segmentstringrequired
unitsintegerrequired
Exposed units in the slice (all variants).
variantsVariantResult[]required
Show child parameters
chance_to_winnumber
ci_highnumber
ci_lownumber
conversionsinteger
Proportion metrics: units that converted (mean = conversions / units before adjustment).
diffnumber
expected_lossnumber
exposed_unitsintegerrequired
Units of this arm that were exposed and analysed (the arm's share of the exposed total).
harm_p_valuenumber
Guardrails: one-sided p-value for harm.
is_controlbooleanrequired
lift_ci_highnumber
lift_ci_lownumber
Fieller interval on relative_lift (ratio metrics only; valid near a zero control).
meannumberrequired
notestring
p_adjustednumber
p_valuenumber
Raw p-value (always-valid for the sequential engine).
relative_liftnumber
significantbooleanrequired
unitsintegerrequired
variantstringrequired
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/running-timeScope experiment:read

Live remaining-days estimate: the current exposure rate against the sample size the primary metric needs, with the baseline and variance read from the running control arm.

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/running-time"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "daily_exposure_rate": 0,
  "days_running": 0,
  "exposed": 0,
  "metric_id": "string",
  "note": "string",
  "progress_pct": 0,
  "remaining_days": 0,
  "required_total": 0,
  "sample_size_per_variant": 0
}
Schema
daily_exposure_ratenumberrequired
days_runningnumberrequired
exposedintegerrequired
Units exposed so far (all variants, switched units excluded).
metric_idstring
Primary metric the estimate is for.
notestring
progress_pctnumber
remaining_daysnumber
Days still needed at the current exposure rate; 0 once reached; null when not estimable.
required_totalinteger
sample_size_per_variantinteger
From the control arm's observed mean / variance and stats_config.mde.
404
503
POSThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/shipScope experiment:write

Winner -> flag serves it to 100% of the ship scope (default: the audience), experiment `shipped` with a results snapshot.

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
conclusionstring
holdback_pctnumber
Ship with holdback (P-M5): keep this share (0 < h <= 50) of the ship scope on the control variant and track the long-term effect (GET .../holdback).
populationFilter[]
Show child parameters
context_kindstring
user | device | org for context filters (LC-FLG-18).
group_typestring
keystringrequired
opstringrequired
Comparison: eq, neq, contains, ncontains, regex, nregex, gt, gte, lt, lte, is_set, is_not_set, in, not_in, icontains, not_icontains, starts_with, not_starts_with, ends_with, not_ends_with, between, not_between, is_date_before, is_date_after, semver_eq, semver_neq, semver_gt, semver_gte, semver_lt, semver_lte, semver_tilde, semver_caret, semver_wildcard, array_contains_any, array_contains_all, array_contains_none, ip_in_cidr, ip_not_in_cidr. event filters take only eq neq gt gte lt lte is_set is_not_set between not_between.
propertiesFilter[]
Predicates on the counted event's own properties (event filters only): only matching events count. Each is {type: "event_property", key, op, value}.
Show child parameters
context_kindstring
user | device | org for context filters (LC-FLG-18).
group_typestring
keystringrequired
opstringrequired
Comparison: eq, neq, contains, ncontains, regex, nregex, gt, gte, lt, lte, is_set, is_not_set, in, not_in, icontains, not_icontains, starts_with, not_starts_with, ends_with, not_ends_with, between, not_between, is_date_before, is_date_after, semver_eq, semver_neq, semver_gt, semver_gte, semver_lt, semver_lte, semver_tilde, semver_caret, semver_wildcard, array_contains_any, array_contains_all, array_contains_none, ip_in_cidr, ip_not_in_cidr. event filters take only eq neq gt gte lt lte is_set is_not_set between not_between.
propertiesFilter[]
Predicates on the counted event's own properties (event filters only): only matching events count. Each is {type: "event_property", key, op, value}.
scopestring
session | page for event filters (P-H6): where the event count is taken; empty = session.
typestringrequired
What the key is read from: person, group, cohort, device, geo, app_version, flag, context, event.
valueobject
scopestring
session | page for event filters (P-H6): where the event count is taken; empty = session.
typestringrequired
What the key is read from: person, group, cohort, device, geo, app_version, flag, context, event.
valueobject
scopestring
Who gets the winner: audience (default, the experiment audience), everyone, or population (the population filters).
winnerstringrequired
{
  "conclusion": "string",
  "holdback_pct": 0,
  "population": [
    {
      "context_kind": "string",
      "group_type": "string",
      "key": "string",
      "op": "string",
      "properties": [
        null
      ],
      "scope": "string",
      "type": "string",
      "value": {}
    }
  ],
  "scope": "string",
  "winner": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/ship" \
  -H "Content-Type: application/json" \
  -d '{"conclusion":"string","holdback_pct":0,"population":[{"context_kind":"string","group_type":"string","key":"string","op":"string","properties":[null],"scope":"string","type":"string","value":{}}],"scope":"string","winner":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "audience": {},
  "conclusion": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "ended_at": "2024-01-01T00:00:00Z",
  "exposure": {},
  "flag_id": "string",
  "flag_key": "string",
  "guardrail_state": {},
  "holdout_id": "string",
  "hypothesis": "string",
  "id": "string",
  "kind": "string",
  "metrics": {},
  "name": "string",
  "namespace_id": "string",
  "project_id": "string",
  "requires_approval": true,
  "schedule": {},
  "shipped_at": "2024-01-01T00:00:00Z",
  "snapshot": {},
  "started_at": "2024-01-01T00:00:00Z",
  "stats_config": {},
  "status": "string",
  "traffic_pct": 0,
  "updated_at": "2024-01-01T00:00:00Z",
  "variants": {},
  "winner": "string"
}
Schema
audienceobjectrequired
conclusionstring
created_atstringrequired
created_bystring
ended_atstring
exposureobjectrequired
flag_idstringrequired
flag_keystring
Key of the flag flag_id names; null only if that flag row is gone.
guardrail_stateobjectrequired
holdout_idstring
hypothesisstringrequired
idstringrequired
kindstringrequired
metricsobjectrequired
{primary: [metric id], secondary: [...], guardrail: [{metric, direction?}]}.
namestringrequired
namespace_idstring
project_idstringrequired
requires_approvalbooleanrequired
scheduleobjectrequired
shipped_atstring
snapshotobject
started_atstring
stats_configobjectrequired
statusstringrequired
traffic_pctnumberrequired
updated_atstringrequired
variantsobjectrequired
winnerstring
400
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/experiments/{id}/surrogates/{model_id}Scope experiment:read

Long-horizon forecast of an experiment through a trained surrogate model: units exposed at least `short_days` ago, their surrogate values over `short_days`, mapped to the outcome.

Parameters

project_idstringpathrequired
idstringpathrequired
model_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/experiments/{id}/surrogates/{model_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "arms": [
    {
      "ci_high": 0,
      "ci_low": 0,
      "diff": 0,
      "p_value": 0,
      "predicted": 0,
      "units": 0,
      "variant": "string"
    }
  ],
  "horizon_days": 0,
  "model_id": "string",
  "outcome_metric_id": "string",
  "r2": 0,
  "short_days": 0
}
Schema
armsArmForecast[]required
Show child parameters
ci_highnumber
ci_lownumber
diffnumber
Versus control (null for control).
p_valuenumber
predictednumberrequired
Predicted long-horizon outcome per unit.
unitsnumberrequired
variantstringrequired
horizon_daysintegerrequired
model_idstringrequired
outcome_metric_idstringrequired
r2numberrequired
short_daysintegerrequired
400
404
503

Updated