Defining cohorts

Using your described data to identify important groups of people

Now that Faraday can understand your data, it's time to use it!

Cohorts

Cohorts are the building blocks you will use later to define your prediction objectives. Each one represents a group of people that's important to you; for example, your customers or leads.

Concretely, a cohort is a group of people who have all experienced the same event. You can also add conditions to further restrict who qualifies for your cohort.

Choosing an event

Any event you specified in the previous step (Registering datasets) can be used to define a new cohort.

For example, if your dataset represents orders, you could define a "Customers" cohort: everybody who has experienced an order event.

curl --request POST \
     --url https://api.faraday.ai/v1/cohorts \
     --header 'Authorization: Bearer YOUR_API_TOKEN' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "name": "Customers",
     "stream_name": "orders"
}
'

Recency

You can optionally specify how recent the event must have been for somebody experiencing it to qualify for the cohort. For example, an "Early customers" cohort could require that someone have experienced an order event more than five years ago.

{
     "name": "Early customers",
     "stream_name": "orders",
     "min_days": 1825 // that's 5 years
}

Frequency

You can also choose to specify how many times the event must have been experienced by a given person for them to qualify for the cohort. For example, a "Multiple purchasers" cohort could require that someone experience an order event at least twice.

{
     "name": "Repeat buyers",
     "stream_name": "orders",
     "min_count": 2
}

Monetary

Finally, you can specify value requirements for events. For example, a "Best customers" cohort could require that someone's order events total at least $1,000 to qualify.

{
     "name": "Best customers",
     "stream_name": "orders",
     "min_value": 1000
}

What's next

Now you're ready for the fun part — choosing what you'd like to predict