Basic Usage

This tutorial guides you through the basic usage of the ConversionFlow library.

Overview

ConversionFlow is a library for conversion goals analysis that employs a two-stage model pipeline:

  1. Estimation stage using Bayesian Network modeling

  2. Optimization stage using Genetic Algorithms

Quick Start

Here’s a minimal example to get you started:

from conversionflow import ConversionFlow

# Initialize the ConversionFlow instance
cf = ConversionFlow(config_path="config.yml")

# Run the full pipeline (estimation and optimization)
cf.run_pipeline()

# Access the results
estimation_results = cf.get_estimation_results()
optimization_results = cf.get_optimization_results()

# Generate reports
cf.generate_reports()

Understanding the Two-Stage Pipeline

Estimation Stage

The Estimation stage builds a detailed probabilistic model to quantify customer journey dynamics:

  1. Data Loading: Ingests relevant datasets from specified sources

  2. Data Preprocessing: Cleans and transforms data for model training

  3. Bayesian Network Model Inference: Constructs a probabilistic model and uses MCMC sampling

Optimization Stage

The Optimization stage utilizes a Genetic Algorithm to maximize conversion value:

  1. Parameter Loading: Loads parameter summaries from the Bayesian Network model

  2. Budget Optimization: Uses Genetic Algorithm to find optimal budget allocation

  3. Output Generation: Provides optimal budget distribution for implementation

Next Steps

Now that you understand the basic usage, proceed to the Building Your First Model tutorial to learn how to create and customize a model for your specific use case.