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:
Estimation stage using Bayesian Network modeling
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:
Data Loading: Ingests relevant datasets from specified sources
Data Preprocessing: Cleans and transforms data for model training
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:
Parameter Loading: Loads parameter summaries from the Bayesian Network model
Budget Optimization: Uses Genetic Algorithm to find optimal budget allocation
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.