Kaplan-Meier survival curve — time-to-event estimator with 95% CI
Per-row — runs once for each row.
| name | type | description |
|---|---|---|
| durations | JSON | Array of time-to-event values (use ARRAY_AGG in caller) |
| events | JSON | Array of booleans, true if event happened, false if censored |
Basic survival curve fit
WITH
cohort AS (
SELECT
*
FROM
(
VALUES
(10.0, TRUE),
(12.0, TRUE),
(15.0, FALSE),
(18.0, TRUE),
(22.0, TRUE),
(25.0, TRUE),
(30.0, FALSE),
(35.0, TRUE),
(40.0, TRUE),
(45.0, FALSE),
(50.0, TRUE),
(60.0, TRUE)
) AS t (duration, event)
)
SELECT
kaplan_meier (ARRAY_AGG(duration), ARRAY_AGG(event)) AS curve
FROM
cohort;Bayesian A/B test (Beta-Binomial) returning full posterior + recommendation
Assess the confidence/quality of a cascade execution result.
Compare values in a group for similarities, differences, and patterns
Generate the strongest counterargument to a position
Differentially-private count (Laplace mechanism, sensitivity=1)
Differentially-private mean (Laplace mechanism)
Kaplan-Meier survival curve — time-to-event estimator with 95% CI
Per-row — runs once for each row.
| name | type | description |
|---|---|---|
| durations | JSON | Array of time-to-event values (use ARRAY_AGG in caller) |
| events | JSON | Array of booleans, true if event happened, false if censored |
Basic survival curve fit
WITH
cohort AS (
SELECT
*
FROM
(
VALUES
(10.0, TRUE),
(12.0, TRUE),
(15.0, FALSE),
(18.0, TRUE),
(22.0, TRUE),
(25.0, TRUE),
(30.0, FALSE),
(35.0, TRUE),
(40.0, TRUE),
(45.0, FALSE),
(50.0, TRUE),
(60.0, TRUE)
) AS t (duration, event)
)
SELECT
kaplan_meier (ARRAY_AGG(duration), ARRAY_AGG(event)) AS curve
FROM
cohort;Bayesian A/B test (Beta-Binomial) returning full posterior + recommendation
Assess the confidence/quality of a cascade execution result.
Compare values in a group for similarities, differences, and patterns
Generate the strongest counterargument to a position
Differentially-private count (Laplace mechanism, sensitivity=1)
Differentially-private mean (Laplace mechanism)