Skip to content

Analyze campaigns with segments derived from a predictive model, an uplift score, or any business rule.

License

Notifications You must be signed in to change notification settings

cvs-health/blockeval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Randomized Block Design Analysis

Python module designed to analyze randomized block design. Blocks can be population segments derived from a predictive model, an uplift score, or any business rule. Individuals within each block have to be randomized in a treated and control group. The sample size ratio between treated and control can differ between blocks. When combining blocks, the Weighted Average Treatment Effect is calculated to mitigate the confounding effect of blocks and avoid Simpson's paradox.

With blockeval, users can:

  • Estimate the treatment effect for each block
  • Roll-up results to get effects for groups of blocks or the entire campaign
  • Compare the treatment effects between blocks or groups of blocks (uplift)
  • Resolve Simpson’s paradox
  • Provide p-values and confidence intervals
  • Handle non-normal distributions with bootstrapping

Results are also valid if the blocks are defined after the intervention in a completely randomized design (as opposed to a randomized block design).

Contributors

  • Mathieu d'Acremont
  • Audrey Lee

Installation

The latest version from PyPI can be installed using the following command:

pip install blockeval

Test

To check the installation, open a Jupyter Notebook and try importing the package functions:

from blockeval.analysis import *
from blockeval.utils import campaign_simulation

Quick Start

Please follow this notebook for a quick introduction to the package.

Medium Blog Post

We wrote a comprehensive review of blockeval in a Medium blog post with a companion notebook.

About

Analyze campaigns with segments derived from a predictive model, an uplift score, or any business rule.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages