vaibhavmagon / FB-Ads-Opt-UCB

The easiest way to optimize Facebook Ads using Upper Confidence Bound Algorithm. πŸ’»

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Facebook Ads Optimisation Script Using Real Life Ads πŸ’»

This code analyzes 43 Facebook ad sets and helps find the best ad set using the Upper Confidence Bound machine learning algorithm.

More on UCB here: http://banditalgs.com/2016/09/18/the-upper-confidence-bound-algorithm/

To Run

  1. Export Ad set from Facebook ads directly for Impressions : Signups (Can use it for other data points as well).
  2. Replace the data in ads-data.csv with current ads data.
  3. Run: sudo python fb-ucb-ads.py

Data

Folder contains the ads-data.csv file with Ads Impressions : Signups data.

Ads Histogram for current Data

Clearly Ad: 2 is the winner and should have higher budget allocation.

screen shot 2019-01-31 at 11 46 28 am

Prerequisits

  • Python 2.7
  • Machine learning libraries
  • Anaconda/Spyder

Contributers

  • Vaibhav Magon