Data Science Toolkit - Bid valuation with custom models

This document provides an explanation of how setting different Goals and Revenue Types on your Line Item will affect your final Bid Valuation (BV). You should have a general understanding of how Custom Models work.

Overview

Custom models are designed to allow data scientists, through the Xandr API, to break out specific portions of their Bid Valuation model by associating multiple Bonsai decision trees and/or Logistic Regression Models with their Augmented Line Items or campaigns as a custom buying strategy. By associating specific types of models to the Expected Value calculation for an impression, it is possible to override portions of Xandr optimization and only allow our system to handle aspects of valuation that your own models do not cover.

This page provides an explanation of how setting different Goals and Revenue types on your ALI will affect your Bid Valuation.  

Bid valuation equation

The final Bid Value is the product of the Expected Value (EV), Cadence Modifier, Bid Modifier, and Adaptive Pacing. This equation can be expressed as:

Diagram of a bid valuation equation.

With the exception of Adaptive Pacing users have the option to customize each of the different components of the Bid Value:

Expected Value (EV)

The Expected Value (EV) of a variable is described as the sum of all possible factors that can impact a Bid Value, each multiplied by the probability of its occurrence.

EV = ( Val(Event) * Pr(Event) )

In the equation above Val(Event) represents the value of an event and Pr(Event) represents the probability of the event occurring.

In the case of media buying, EV is linked to a single event, such as a viewed impression, a user click, or user conversion, where the event has a specific value to the buyer, the Val(Event) variable. The Val(Event) value could be fixed or accrue over time given certain factors, such as customer lifetime value.

With the optimization model, clients are asked to predict the EV of an impression entirely or modify the Xandr optimized bid value. However, in most cases, clients may only wish to provide a portion of the EV calculation based on the data that they are able to model, rather than replace the entire calculation given the limited data that they may have. Custom models solve this issue, enabling clients to override specific components of the optimization equation.

EV can be the value of one model type or the product of multiple model types. The calculation for EV is dependent on the Goal Type set on your Line Item. For example, if your Augmented Line Item had a Goal Type of CPC, then your EV could be comprised of an ev_click custom model or a click_imp custom model or both.

Example valuation model

If we expand the EV equation above, assuming that we have set a CPC Goal Type on the Line Item the equation would appear as:

EV = Pr(Click | Impression) * R

where,

  • Pr(Click | Impression) = Probability of Click, given an impression
  • R = Expected return if user has clicked

Expected valuation model with offline factors

The probability of a client-specific offline event, given an online event (Pr(offline event | online event)), is not a model that Xandr could ever construct. Since these types of models would involve non-fixed values of R, a number of Conditional Component Model Types can be associated with an Augmented Line Item or campaign. A 'custom_models' array field can be used to influence the calculation of an EV for a given impression. In the case where a specific model is not associated in the custom_models group setting, a default or Xandr derived value will be used in the calculation.

Cadence modifier

The Cadence Modifier adjusts the amount of a bid based on frequency (the number of times the user has seen the creative) and recency (the amount of time that has passed since the user last saw the creative).

Bid modifier

The amount by which a bid on an impression will be multiplied.

Adaptive pacing

Adaptive pacing controls a line item's pacing and prevents overpaying. Using the line item's daily budget (either generated by Xandr automatically or manually entered by the user), Xandr will calculate an ideal spend curve so that advertiser dollars are distributed evenly throughout the day. A dynamically calculated bid multiplier is applied to bids to control the amount of spend. If a line item is hitting its target delivery easily, the bid modifier will shade bids down, but only to the extent that delivery does not suffer. If a line item is not meeting its target delivery, adaptive pacing will shade bids less or not at all in order to meet target spend.

Component model types and default values

Before explaining how the Expected Value is calculated for each Goal Type, it will be important to note the different types of Component Models available to associate with Augmented Line Items.

These are the current model types that are supported. They can be represented as either a Bonsai decision tree or a Logistic Regression model.

In the case that an eligible Component Model is not included for the Expected Value calculation - as described in the sections below - a default value will be provided by Xandr.

ID Name Description Default Value, if not associated with Line Item
1 expected_value current expected value model EV(imp)
- $1 CPM represented as 1000
The EV calculation changes based on the Goal Type set on the Line Item. The presence of the expected_value model on a Line Item will effectively override that goal_type EV equation.
2 creative_selection current creative selection model Uniform random selection. For more details, see our documentation on Creative Selection Models.
3 ev_click EV(click)
- Cost per click
- $1 CPC represented as 1000
Goal CPC
4 click_imp CTR model that can be used for thresholds and prediction p(click | imp) built-in CTR prediction
5 ev_conv EV(conv) - Lifetime Value (LTV) or basket size model ($ per conv)
- Cost per conversion
- $1 CPC represented as 1000
Goal CPA
6 conv_imp p(conv | imp) - post-view conv rate model built-in conv prediction
7 conv_click p(conv | click) built-in click-conv prediction
8 bid_modifier Allows an arbitrary modifier to be applied 1
9 nonvaluation For custom macros, learn status, and other non-valuation nodes N/A (does not impact valuation). Currently used in standard feed LLD reporting, via leaf_name. For more information, see our Non-valuation Custom Model documentation.
10 cadence For cadence models Cadence model if cadence enabled, 1 if disabled.
The cadence multiplier is capped to 1 in learn.

Goal types and expected value

The table below outlines how goal_type set on the Line Item will affect the Expected Value calculation, and component models considered for that goal_type.

Goal Type Eligible Models EV Equations
CPC - ev_click
- click_imp
expected_value == ev_click * click_imp
CPA - ev_conv
- conv_imp
expected_value == ev_conv * conv_imp
Custom expected_value expected_value
None N/A expected_value will be derived from a Maximum Average CPM, specified as:
- UI: "Pay a Flat Rate"
- API: on the Line Item as line_item.valuation.max_avg_cpm

Models valid on any goal type

Some models can be associated with every Line Item, regardless of Goal Type:

Cadence models

The cadence model is factored into the Expected Value equation for each goal_type.

Note

Cadence models are currently set by default on Line Items, and are updated automatically by Xandr, per advertiser.

Bid modifier model

The bid_modifier model is applied at the last stage of the expected_value calculation, before all Revenue Type and serving fee attributes are applied.

Creative selection trees

These trees allow for custom selection of creatives that are served for a given impression. More information can be found on the Creative Selection Custom Model page.

Expected value

Expected Value models will override the expected value calculation in any Goal Type. The output of the model will then serve as the Expected Value.

Non-valuation

Non-valuation models do not impact the EV calculation, and are described in further detail in the Non-valuation Custom Model documentation.

Revenue type and bid calculation

When Expected Value has been calculated based on the goal_type and the Custom models set on your Line Item, the final Bid Value is affected by the Revenue Type set on your Line Item. See the table below to see how Revenue Type affects the final bid value:

Revenue Type How the Bidder Calculates the Final Bid Don't Bid If... Eligible Goal Types
Impressions (CPM) 1. If using minimum margin, subtract margin and fees from CPM Revenue Value set on the Line Item.
2. Shade with Adaptive Pacing.
3. Bid
EV is less than the CPM Revenue Value set on the line item, or the bid value is 0. all
Cost Plus Margin 1. Subtract margin and fees from EV.
2. Shade with Adaptive Pacing.
3. Bid
Bid value is 0. all
Cost Plus Margin, paying per view 1. Divide EV by the probability that the ad is viewable.
2. Subtract margin and fees.
3. Apply the eCPM conversion rate provided by the Xandr imp bus (includes viewability prediction and risk premium for the chosen viewable currency).
4. Shade with Adaptive Pacing.
5. Bid
Bid value is 0. Custom, None
dCPM 1. Shade EV with Adaptive Pacing.
2. Bound this paced EV between the min and max average CPMs.
3. If using minimum margins, subtract margin and fees.
4. Bid
Bid value is 0. all
CPC 1. Find CPM revenue value by multiplying the CPC Revenue Value set on the Line Item by the probability of a click by 1000.
2. If using minimum margins, subtract margin and fees.
3. Shade with Adaptive Pacing.
4. Bid
EV multiplied by the probability of a click is less than the derived CPM revenue value; or, bid value is 0. Xandr CPC (with or without overrides) or Custom.
vCPM
(paying per impression)
1. Find CPM revenue value by multiplying the CPVM value set on the Line Item by viewthrough percentage
2. If using minimum margins, subtract margin and fees
3. Shade bid with Adaptive Pacing
4. Bid
EV multiplied by view probability is less than CPM revenue value; or, bid value is 0. Xandr CPVM (without overrides) or Custom.
vCPM
(paying per view)
1. Find CPM revenue value by multiplying the CPVM value set on the Line Item by viewthrough percentage.
2. If using minimum margins, subtract margin and fees.
3. Apply the eCPM conversion rate provided by the AppNexus ImpBus (includes viewability prediction and risk premium for the chosen viewable currency).
4. Shade bid with Adaptive Pacing.
5. Bid
EV is less than CPM revenue value multiplied by view probability. Xandr CPVM (without overrides) or Custom.

Note

Adaptive pacing controls a line item's pacing and prevents overpaying. Using the line item's daily budget (either generated by Xandr automatically or manually entered by the user), Xandr will calculate an ideal spend curve so that advertiser dollars are distributed evenly throughout the day.