seismometer.configuration.model.Cohort

pydantic model seismometer.configuration.model.Cohort

The definition of an expected cohort attribute.

This structure defines a cohort attribute that should be available for selection in a notebook. For a categorical data, the splits should all be existing values and the list limits the selections available. For numerical data, the splits should be the inner boundaries of bucketing; with a high and low being added outside theses values.

Show Entity Relationship Diagram
digraph "Entity Relationship Diagram created by erdantic" {
   graph [fontcolor=gray66,
      fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=9,
      nodesep=0.5,
      rankdir=LR,
      ranksep=1.5
   ];
   node [fontname="Times New Roman,Times,Liberation Serif,serif",
      fontsize=14,
      label="\N",
      shape=plain
   ];
   edge [dir=both];
   "seismometer.configuration.model.Cohort"   [label=<<table border="0" cellborder="1" cellspacing="0"><tr><td port="_root" colspan="2"><b>Cohort</b></td></tr><tr><td>source</td><td port="source">str</td></tr><tr><td>display_name</td><td port="display_name">str</td></tr><tr><td>splits</td><td port="splits">Optional[list[Any]]</td></tr></table>>,
      tooltip="seismometer.configuration.model.Cohort&#xA;&#xA;The definition of an expected cohort attribute.&#xA;&#xA;This structure defines \
a cohort attribute that should be available for selection in a notebook.&#xA;For a categorical data, the splits should all be existing \
values and the list limits the selections available.&#xA;For numerical data, the splits should be the inner boundaries of bucketing; \
with a high and low being added&#xA;outside theses values.&#xA;"];
}

Show JSON schema
{
   "title": "Cohort",
   "description": "The definition of an expected cohort attribute.\n\nThis structure defines a cohort attribute that should be available for selection in a notebook.\nFor a categorical data, the splits should all be existing values and the list limits the selections available.\nFor numerical data, the splits should be the inner boundaries of bucketing; with a high and low being added\noutside theses values.",
   "type": "object",
   "properties": {
      "source": {
         "title": "Source",
         "type": "string"
      },
      "display_name": {
         "default": "",
         "title": "Display Name",
         "type": "string"
      },
      "splits": {
         "anyOf": [
            {
               "items": {},
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [],
         "title": "Splits"
      }
   },
   "required": [
      "source"
   ]
}

Fields:
Validators:
field display_name: str = ''

The display name for the cohort.

If not specified, defaults to the source name. Display names must be unique across the dataset and are what is referenced in usage configuration.

Validated by:
field source: str [Required]

The source column name for a cohort.

field splits: list[Any] | None = []

An optional list of ‘inner edges’ used to create a set of cohorts from a continuous attribute.

validator default_display_name  »  display_name

Ensures that display_name exists, setting it to the source name if not provided.

Parameters:
  • display_name (str)

  • values (dict)

Return type:

str