Cohort retention matrix and weighted curve
predictive-analytics_cohort-retentionBuild day/week/month cohort retention in classic or rolling mode from signup and activity dates, with partial-period flags and a size-weighted curve. Price $0.03 USDC. POST /api/v1/predictive-analytics/cohort-retention. An unpaid call returns the x402 payment terms and does not run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"events": "<events>",
"asOf": "<asOf>"
},
"name": "predictive-analytics_cohort-retention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | Yes | asOf, string. Required. | |
| mode | No | mode, string, one of classic, rolling. Required. | classic |
| events | Yes | events, array. Required. | |
| period | No | period, string, one of day, week, month. Required. | month |
| timezone | No | timezone, string, length 1 to 64. Required. | UTC |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cohorts | No | cohorts. Array. | |
| sources | No | sources. Array. | |
| limitations | No | limitations. Array. | |
| weightedCurve | No | weightedCurve. Array. |