Table of content
A/B testing allows comparing two or more versions of a given service against each other to find out which variation performs better.
This repository contains an implementation of AB testing for the Classical, Sequential, and ML approaches. I have used data collected by an Advertising company running an online ad for a client to increase brand awareness. To increase its market competitiveness, the advertising company provides a further service that quantifies the increase in brand awareness as a result of the ads it shows to online users.
The main objective is to design a reliable hypothesis testing algorithm to test if the ads that the advertising company runs resulted in a significant lift in brand awareness. Through this, we will explore Classical, Sequential, and ML approaches to A/B testing,
Python 3.5 and above, Pip and MYSQL
git clone https://github.com/eandualem/abtest-mlops
cd abtest-mlops
pip install -r requirements.txt
- The notebook for Data Exploration is inside the notebooks folder in the file classical-ab-testing.ipynb.
- The notebook for Classical A/B Testing is inside the notebooks folder in the file classical-ab-testing.ipynb.
- The notebook for Sequential A/B Testing is inside the notebooks folder in the file sequential-ab-testing.ipynb.
- The notebook for ML A/B Testing is inside the notebooks folder in the file ml-ab-testing.ipynb.
create_dataset_versions
: simple script for creating different versions of the data AdSmartABdata.csvcreate_dataset
: simple script for creating train, test split of AdSmartABdata.csvcreate_features
: simple script for creating features for train and test datatrain_model
: class trains a model using 5-fold cross validation and returns the best modeltrain_logistic_model
: simple script for training logistic regression using TrainModel classtrain_decision_trees_model
: simple script for training decision tree using TrainModel classtrain_xgboost_model
: simple script for training xgboost using TrainModel classevaluate_model
: class for calculates evaluation metrics for a give model using actual dataevaluate_logistic_model
: simple script for evaluating logistic model using EvaluateModel classevaluate_decision_trees
: simple script for evaluating decision tree model using EvaluateModel classevaluate_xgboost_model
: simple script for evaluating xgboost model using EvaluateModel classdf_helper
: helper class for reading csv and saving csv files
- There is a test file for df_helper inside the tests folder.
- The file .travis.yml contains the configuration for Travis.