Coder Social home page Coder Social logo

gzuidhof / ai-at-the-web-scale Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 234 KB

Final project for "AI at the web scale" course (profit optimization for webshop -> contextual bandit problem)

License: GNU General Public License v2.0

Python 100.00%

ai-at-the-web-scale's Introduction

ai-at-the-web-scale

Final project for "AI at the web scale" course. This project involves maximizing the cumulative reward for simulated visitors on a website by serving ads with various parameters. This is a contextual bandit problem.

##Dependencies

  • Python 2.7
  • numpy, pandas, sklearn, matplotlib, scipy.
  • plotta-python (pip install plotta). You should run Plotta locally for live plotting of some stats.

##Directions Add a credentials.py file with two variables, TEAM_ID and PASSWORD with your team name and password for the API.

####Data retrieval and analysis

  • context_get_pool.py contains a parallel generator of contexts (so that at least one is always ready), this halves the running time more or less.
  • scraper.py Parallel scraper, uses random actions.
  • analysis.py Ad-hoc script for exploring the scraped data.
  • api.py Wrapper for the REST API.

###Model/learning

  • bts.py Bootstrap Thompson Sampling implementation.
  • models.py Contains all models (Random, Linear model, Thompson sampling model)
  • decode.py, encode.py Used for encoding and decoding of actions and contexts from and into a feature vector.
  • linmod.py Offline linear model.

###Misc

  • constants.py Contains domain information of the assignment.
  • run.py Entry point.

ai-at-the-web-scale's People

Contributors

gzuidhof avatar stevenreitsma avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ai-at-the-web-scale's Issues

To do

  • Loop
  • Epsilon-first linear model
  • Epsilon-greedy linear model (update online)
  • Generalized linear models
  • BTS (misschien)
def choice(context) returns actions (price, color, etc.)
def reward(success, price, context, action) returns None

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.