Skip to content

DiversityColumn

Source code in docs_src/capo_customer_profiles/types/diversity_column.py
class DiversityColumn(TypedDict, closed=True):
    name: "capo_customer_profiles.types.text.text"
    """<p>The name of the item catalog column on which to apply the diversity cap. The column must be defined in the recommender schema.</p>"""
    cap_type: "capo_customer_profiles.types.diversity_cap_type.DiversityCapType"
    """<p>The type of diversity cap to apply. Valid values are <code>PERCENTAGE</code> (interpret <code>Target</code> as a percentage of returned items) and <code>VALUE</code> (interpret <code>Target</code> as an absolute count).</p>"""
    target: "capo_customer_profiles.types.diversity_target_expression.DiversityTargetExpression"
    """<p>The diversity cap target. Either an integer literal (for example, <code>"25"</code>) or a placeholder expression of the form <code>$name</code> whose value is supplied at inference time through <code>GetProfileRecommendations</code>.</p>"""

cap_type instance-attribute

cap_type: DiversityCapType

The type of diversity cap to apply. Valid values are PERCENTAGE (interpret Target as a percentage of returned items) and VALUE (interpret Target as an absolute count).

name instance-attribute

name: text

The name of the item catalog column on which to apply the diversity cap. The column must be defined in the recommender schema.

target instance-attribute

The diversity cap target. Either an integer literal (for example, "25") or a placeholder expression of the form $name whose value is supplied at inference time through GetProfileRecommendations.