Skip to content

Demographic selection

DemographicSelection #

DemographicSelection(keys: list[str], max_rapids: int)

Bases: RapidataSelection

Demographic selection class.

This is used to ask demographic questions in an order.

The keys will select the rapids based on the confidence we already saved for each user.

If the confidence is high, the users will be selected to solve the rapids with lower probability.

Parameters:

Name Type Description Default
keys list[str]

List of keys for the demographic rapids to be shown. As an example: "age"

required
max_rapids int

The maximum number of rapids to run.

Allows to provide more keys, in case some of the earlier ones are not selected because of high confidence.

required
Source code in src/rapidata/rapidata_client/selection/demographic_selection.py
def __init__(self, keys: list[str], max_rapids: int):
    self.keys = keys
    self.max_rapids = max_rapids