Skip to content

User score filter

UserScoreFilter #

UserScoreFilter(
    lower_bound: float = 0.0,
    upper_bound: float = 1.0,
    dimension: str | None = None,
)

Bases: RapidataFilter, BaseModel

UserScoreFilter Class

Can be used to filter who to target based on their user score.

Parameters:

Name Type Description Default
lower_bound float

The lower bound of the user score.

0.0
upper_bound float

The upper bound of the user score.

1.0
dimension str

The dimension of the userScore to be considerd for the filter.

None
Example

UserScoreFilter(0.5, 0.9)
This will only show the order to users that have a UserScore of >=0.5 and <=0.9

Source code in src/rapidata/rapidata_client/filter/user_score_filter.py
def __init__(
    self,
    lower_bound: float = 0.0,
    upper_bound: float = 1.0,
    dimension: str | None = None,
):
    super().__init__(
        lower_bound=lower_bound, upper_bound=upper_bound, dimension=dimension
    )