Class PageOptimizationConfig (1.20.1)

PageOptimizationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The PageOptimizationConfig for model training.

This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.

Attributes

Name Description
page_optimization_event_type str
Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: - add-to-cart: Products being added to cart. - detail-page-view: Products detail page viewed. - home-page-view: Homepage viewed - category-page-view: Homepage viewed - shopping-cart-page-view: User viewing a shopping cart. home-page-view only allows models with type recommended-for-you. All other page_optimization_event_type allow all Model.types.
panels MutableSequence[google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig.Panel]
Required. A list of panel configurations. Limit = 5.
restriction google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig.Restriction
Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to UNIQUE_MODEL_RESTRICTION.

Classes

Candidate

Candidate(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Panel

Panel(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An individual panel with a list of ServingConfigs to consider for it.

Restriction

Restriction(value)

Restrictions of expected returned results.

Values: RESTRICTION_UNSPECIFIED (0): Unspecified value for restriction. NO_RESTRICTION (1): Allow any ServingConfig to be show on any number of panels.

    Example:

    `Panel1 candidates`: pdp_ctr, pdp_cvr,
    home_page_ctr_no_diversity

    `Panel2 candidates`: home_page_ctr_no_diversity,
    home_page_ctr_diversity, pdp_cvr_no_diversity

    `Restriction` = NO_RESTRICTION

    `Valid combinations`:

    -   (pdp_ctr, home_page_ctr_no_diversity)
    -  (pdp_ctr, home_page_ctr_diversity)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_cvr, home_page_ctr_no_diversity)
    -  (pdp_cvr, home_page_ctr_diversity)
    -  (pdp_cvr, pdp_cvr_no_diversity)
    -  (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    -  (home_page_ctr_no_diversity, home_page_ctr_diversity)
    -  (home_page_ctr_no_diversity, pdp_cvr_no_diversity)

    `Invalid combinations`: []
UNIQUE_SERVING_CONFIG_RESTRICTION (2):
    Do not allow the same
    <xref uid="google.cloud.retail.v2alpha.ServingConfig.name">ServingConfig.name</xref>
    to be shown on multiple panels.

    Example:

    `Panel1 candidates`: pdp_ctr, pdp_cvr,
    home_page_ctr_no_diversity

    `Panel2 candidates`: home_page_ctr_no_diversity,
    home_page_ctr_diversity_low, pdp_cvr_no_diversity

    `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION`

    `Valid combinations`:

    -   (pdp_ctr, home_page_ctr_no_diversity)
    -  (pdp_ctr, home_page_ctr_diversity_low)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_cvr, home_page_ctr_no_diversity)
    -  (pdp_cvr, home_page_ctr_diversity_low)
    -  (pdp_cvr, pdp_cvr_no_diversity)
    -  (home_page_ctr_no_diversity, home_page_ctr_diversity_low)
    -  (home_page_ctr_no_diversity, pdp_cvr_no_diversity)

    `Invalid combinations`:

    -   (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
UNIQUE_MODEL_RESTRICTION (3):
    Do not allow multiple
    <xref uid="google.cloud.retail.v2alpha.ServingConfig">ServingConfigs</xref>
    with same
    <xref uid="google.cloud.retail.v2alpha.Model.name">Model.name</xref> to be
    show on on different panels.

    Example:

    `Panel1 candidates`: pdp_ctr, pdp_cvr,
    home_page_ctr_no_diversity

    `Panel2 candidates`: home_page_ctr_no_diversity,
    home_page_ctr_diversity_low, pdp_cvr_no_diversity

    `Restriction` = `UNIQUE_MODEL_RESTRICTION`

    `Valid combinations`:

    -   (pdp_ctr, home_page_ctr_no_diversity)
    -  (pdp_ctr, home_page_ctr_diversity)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_cvr, home_page_ctr_no_diversity)
    -  (pdp_cvr, home_page_ctr_diversity_low)
    -  (home_page_ctr_no_diversity, pdp_cvr_no_diversity)

    `Invalid combinations`:

    -   (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    -  (pdp_cvr, pdp_cvr_no_diversity)
UNIQUE_MODEL_TYPE_RESTRICTION (4):
    Do not allow multiple
    <xref uid="google.cloud.retail.v2alpha.ServingConfig">ServingConfigs</xref>
    with same
    <xref uid="google.cloud.retail.v2alpha.Model.type">Model.type</xref> to be
    shown on different panels.

    Example:

    `Panel1 candidates`: pdp_ctr, pdp_cvr,
    home_page_ctr_no_diversity

    `Panel2 candidates`: home_page_ctr_no_diversity,
    home_page_ctr_diversity_low, pdp_cvr_no_diversity

    `Restriction` = `UNIQUE_MODEL_RESTRICTION`

    `Valid combinations`:

    -   (pdp_ctr, home_page_ctr_no_diversity)
    -  (pdp_ctr, home_page_ctr_diversity)
    -  (pdp_cvr, home_page_ctr_no_diversity)
    -  (pdp_cvr, home_page_ctr_diversity_low)
    -  (home_page_ctr_no_diversity, pdp_cvr_no_diversity)

    `Invalid combinations`:

    -   (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_ctr, pdp_cvr_no_diversity)
    -  (pdp_cvr, pdp_cvr_no_diversity)
    -  (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    -  (home_page_ctr_no_diversity, home_page_ctr_diversity)