Optimisation Process

Problem Statement

Conversion Value Bidding seeks to determine the optimal distribution of a fixed advertising budget across various customer journey touchpoints to achieve the maximum total expected conversion value. The objective is to devise an efficient budget allocation strategy that maximizes conversion value.

Mathematical Formulation

Customer Journey Graph

Let \(G = (V, E)\) be a Directed Acyclic Graph (DAG) representing the customer journey, where:

  • \(V = \{v_1, v_2, \ldots, v_n\}\) is the set of nodes representing touchpoints

  • \(E\) is the set of directed edges representing causal relationships

Model Parameters

For each node \(a \in V\), we define:

  • \(\beta_{a0}\): Baseline conversion propensity

  • \(\beta_{a1}\): Budget sensitivity coefficient

  • \(\beta_{aj}\): Parent node influence coefficient (for each parent node \(j\))

  • \(\alpha_a\): Conversion value associated with node \(a\)

Decision Variables

The budget allocation vector \(x = (x_{v_1}, x_{v_2}, \ldots, x_{v_n})\), where \(x_a\) denotes the budget allocated to node \(a\).

Constraints

  • Total Budget Constraint: \(\sum_{a \in V} x_a \leq B\)

  • Non-negativity Constraint: \(x_a \geq 0, \forall a \in V\)

  • Optional Node-Specific Budget Limits: \(L_a \leq x_a \leq U_a, \forall a \in V\)

Objective Function

The conversion probability at each node is modelled using:

\[P_a(x) = \sigma\left(\beta_{a0} + \beta_{a1} \ln\left(1 + \frac{x_a}{S}\right) + \sum_{j \in pa(a)} \beta_{aj} P_j(x)\right)\]

Where:

  • \(\sigma(z) = \frac{1}{1 + e^{-z}}\) is the sigmoid function

  • \(S\) is a scaling factor (typically 1000)

  • \(\ln\left(1 + \frac{x_a}{S}\right)\) introduces diminishing returns

The objective is to maximize:

\[\max_{x} \mathbb{E}[CV(x)] = \sum_{a \in V} \alpha_a \cdot P_a(x)\]

Optimisation Algorithm: Genetic Algorithm

Given the non-linear and potentially non-convex nature of the objective function, a Genetic Algorithm (GA) is employed:

  1. Population Initialization: Generate an initial population of candidate budget allocation vectors

  2. Fitness Evaluation: Evaluate each candidate using a robust conversion value function

  3. Parent Selection: Select parent individuals using tournament selection

  4. Crossover and Mutation: Generate new offspring through genetic operators

  5. Population Replacement: Form a new population with generated offspring

  6. Iteration and Convergence: Repeat the process for a predefined number of generations

Implementation Details

Parameter Loading

Loads essential model parameters from the parameter_summary.csv file generated during the Estimation stage.

Robust Conversion Value Function

Calculates the expected conversion value for a given budget allocation, incorporating:

  • Parameter uncertainty

  • Parent node effects

  • Diminishing returns

  • Constraint penalties

Genetic Algorithm Class

The GeneticOptimizer class encapsulates:

  • Population management

  • Fitness evaluation

  • Parent selection

  • Crossover operations

  • Mutation

  • Optimization loop

Optimization Execution and Output

The process outputs the optimal budget allocation as a dictionary, mapping each customer journey node to its recommended budget allocation.