Git Product home page Git Product logo

shapley-attribution-model-zhao-naive's Introduction

Shapley Value Methods for Attribution Modeling (Naive, Set-based)

A Python implementation of "Shapley Value Methods for Attribution Modeling in Online Advertising" by Zhao, et al.

How to use:

  1. Clone this repository
git clone https://github.com/ianchute/shapley-attribution-model.git
  1. Import one of the two Shapley Attribution Models
  from simplified_shapley_attribution_model import SimplifiedShapleyAttributionModel
  1. Initialize the model
model = SimplifiedShapleyAttributionModel()
  1. Feed customer journeys into the model (represented by list of lists of integers, where each integer represents a channel, product, or other object that can be attributed to a certain event). Sample data can be found in the data folder.
import json
with open("data/sample.json", "r") as f:
  journeys = json.load(f)
result = model.attribute(journeys)
  1. The result is a dictionary of attributions (keys are channels, values are attribution scores; for OrderedShapleyAttributionModel, a list of attributions is returned - one for each touchpoint in the journey)

Available models:

  1. SimplifiedShapleyAttributionModel
  2. OrderedShapleyAttributionModel

shapley-attribution-model-zhao-naive's People

Contributors

ianchute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

shapley-attribution-model-zhao-naive's Issues

problems

this paper just evently attribute revenue to all touchpoint in click path , it is naive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.