Skip to content

Commit

Permalink
Repackaging into TensorHouse
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatsov committed Feb 24, 2020
1 parent 0a7593f commit 8d7fc86
Show file tree
Hide file tree
Showing 21 changed files with 3,654 additions and 1,171 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ ENV/

# mypy
.mypy_cache/

.DS_Store
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
Models from Introduction to Algorithmic Marketing book, as well as more advanced marketng and pricing models.
<p align="center">
<img src="https://github.com/ikatsov/algorithmic-marketing-examples/blob/master/resources/logo-2000x436px-gr.png" title="TensorHouse Logo">
</p>

Book's website - https://algorithmicweb.wordpress.com/
### About
TensorHouse is a collection of reference machine learning and optimization models for enterprise operations: marketing, pricing, supply chain, and more. The goal of the project is to provide baseline implementations for industrial, research, and educational purposes.

This project contains the follwoing resources:
* a well-documented repository of reference model implementations,
* a manually curated list of [important papers](https://github.com/ikatsov/tensor-house/blob/master/resources/papers.md) in modern operations research,
* a manually curated list of [public datasets](https://github.com/ikatsov/tensor-house/blob/master/resources/datasets.md) related to entrerpirse use cases.

### Illustrative Example
*Strategic price optimization using reinforcement learning*
![Price Optimization Using RL Animation](https://github.com/ikatsov/algorithmic-marketing-examples/blob/master/resources/hilo-pricing-dqn-training-animation.gif)

### List of Models

* Promotions and Advertisements
* Campaign/Channel Attribution using Adstock Model
* Customer Lifetime Value (LTV) Modeling using Markov Chain
* Next Best Action Model using Reinforcement Learning (Fitted Q Iteration)
* Multi-touch Multi-channel Attribution Model using Deep Learning (LSTM with Attention)
* Search
* Latent Semantic Analysis (LSA)
* Recommendations
* Nearest Neighbor User-based Collaborative Filtering
* Nearest Neighbor Item-based Collaborative Filtering
* Item2Vec Model using NLP Methods (word2vec)
* Customer2Vec Model using NLP Methods (doc2vec)
* Pricing and Assortment
* Markdown Price Optimization
* Dynamic Pricing using Thompson Sampling
* Dynamic Pricing with Limited Price Experimentation
* Price Optimization using Reinforcement Learning (DQN)
* Supply Chain
* Multi-echelon Inventory Optimization using Reinforcement Learning (DDPG, TD3)

### Approach
* The most basic models come from Introduction to Algorithmic Marketing book. Book's website - https://algorithmicweb.wordpress.com/
* More advanced models use deep learning techniques to analyze event sequences (e.g. clickstream) and reinforcement learning for optimization (e.g. safety stock management policy)
* Almost all models are based on industrial reports and real-life case studies

### Contributors
* Ilya Katsov
* Dmytro Zikrach
44 changes: 27 additions & 17 deletions pricing/dynamic-pricing-limited-experimentation.ipynb
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {
"collapsed": true
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
"# This is an implementation of the dynamic pricing model from\n",
"#\n",
"# Cheung, Wang Chi and Simchi-Levi, David and Wang, He, \n",
"# Dynamic Pricing and Demand Learning with Limited Price Experimentation \n",
"# (February 26, 2017). Operations Research, Forthcoming. \n",
"# Available at SSRN: https://ssrn.com/abstract=2457296 or http://dx.doi.org/10.2139/ssrn.2457296\n",
"#\n",
"# See also https://blog.griddynamics.com/dynamic-pricing-algorithms/"
"# Dynamic Pricing Model Using Hypothesis Testing\n",
"\n",
"We implement a dynamic price optimization model that generates a set of hypothesis (using historical data or some alternative approach) and optimizes price through ascent in this hypothesis space.\n",
"\n",
"| Property | Value |\n",
"|--|--|\n",
"| Description | D004 (see [descriptions](https://github.com/ikatsov/tensor-house/blob/master/resources/descriptions.md)) |\n",
"| Dataset | NA |\n",
"| Papers | Cheung2017 (see [papers](https://github.com/ikatsov/tensor-house/blob/master/resources/papers.md)) | "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -137,7 +141,10 @@
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -235,7 +242,10 @@
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -274,9 +284,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
43 changes: 24 additions & 19 deletions pricing/dynamic-pricing-thompson.ipynb
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"cell_type": "markdown",
"metadata": {},
"source": [
"# This is an implementation of the dynamic pricing model from\n",
"#\n",
"# Ferreira, Kris and Simchi-Levi, David and Wang, He, \n",
"# Online Network Revenue Management Using Thompson Sampling (November 7, 2017). \n",
"# Operations Research, Forthcoming. \n",
"# Available at SSRN: https://ssrn.com/abstract=2588730 or http://dx.doi.org/10.2139/ssrn.2588730\n",
"# https://pdfs.semanticscholar.org/6dce/31c44fb1ad1b8dbe231f7654c37506daa909.pdf\n",
"# Dynamic Pricing Model Using Thompson Sampling\n",
"\n",
"We implement a dynamic price optimization model for descrete price levels using Thompson sampling.\n",
"\n",
"# See also https://blog.griddynamics.com/dynamic-pricing-algorithms/"
"| Property | Value |\n",
"|--|--|\n",
"| Description | D004 (see [descriptions](https://github.com/ikatsov/tensor-house/blob/master/resources/descriptions.md)) |\n",
"| Dataset | NA |\n",
"| Papers | Ferreira2017 (see [papers](https://github.com/ikatsov/tensor-house/blob/master/resources/papers.md)) | "
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand All @@ -46,7 +45,10 @@
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -210,7 +212,10 @@
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -251,9 +256,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
45 changes: 29 additions & 16 deletions pricing/markdown-optimization.ipynb
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 141,
"cell_type": "markdown",
"metadata": {
"collapsed": true
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
"# Models from Introduction to Algorithmic Marketing\n",
"# https://algorithmicweb.wordpress.com/\n",
"#\n",
"# This model optimizes prices for N consecutive time periods \n",
"# each of which has its own demand function. It is assumed that \n",
"# the stock level of the product is limited and the goal\n",
"# is to sell out the stock in time maximizing the revenue."
"# Basic Markdown Optimization Model\n",
"\n",
"This model optimizes prices for N consecutive time periods \n",
"each of which has its own demand function. It is assumed that \n",
"the stock level of the product is limited and the goal\n",
"is to sell out the stock in time maximizing the revenue.\n",
"\n",
"| Property | Value |\n",
"|--|--|\n",
"| Description | See [Introduction to Algorithmic Marketing](https://algorithmicweb.wordpress.com/ ) book |\n",
"| Dataset | Synthetic |"
]
},
{
"cell_type": "code",
"execution_count": 142,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand All @@ -41,7 +48,10 @@
"cell_type": "code",
"execution_count": 143,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -106,7 +116,10 @@
"cell_type": "code",
"execution_count": 145,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -214,9 +227,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit 8d7fc86

Please sign in to comment.