Awesome
<p align="center"> <img src="https://github.com/ikatsov/algorithmic-marketing-examples/blob/master/_resources/logo-banner.png" title="TensorHouse Logo"> </p>What is TensorHouse?
TensorHouse is a collection of reference Jupyter notebooks and demo AI/ML applications for enterprise use cases: marketing, pricing, supply chain, smart manufacturing, and more. The goal of the project is to provide a toolkit for rapid readiness assessment, exploratory data analysis, and prototyping of various modeling approaches for typical enterprise AI/ML/data science projects.
TensorHouse provides the following resources:
- A well-documented repository of reference notebooks and demo applications (prototypes).
- Readiness assessment and requirement gathering questionnaires for typical enterprise AI/ML projects.
- Datasets, data generators, and simulators for rapid prototyping and model evaluation.
TensorHouse focuses mainly on industry-proven solutions that leverage deep learning, reinforcement learning, and casual inference methods and models. Most of these solutions were originally developed either by industry practitioners or by academic researchers who worked in collaboration with leading companies in technology, retail, manufacturing, and other sectors.
How Does TensorHouse Help?
TensorHouse helps to accelerate the following steps of the solution development:
- Faster evaluate readiness for specific use cases from the data, integration, and process perspectives using questionnaires and casual inference templates.
- Choose candidate methods and models for solving your use cases, evaluate and tailor them using simulators and sample datasets.
- Evaluate candidate methods and models on your data, build prototypes, and present preliminary results to stakeholders.
What Libs Does TensorHouse Use?
All prototypes and template are implemented in Python using a limited set of standard libraries:
- Deep learning: mostly
TensorFlow
, some prototypes usePyTorch
- Reinforcement learning:
RLlib
- Causal inference:
DoWhy
,EconML
- Probabilistic programming / Bayesian inference:
PyMC
- Generative AI:
LangChain
- Traditional ML:
statsmodels
,scikit-learn
,LightGBM
- Basic libs:
NumPy
,pandas
,matplotlib
,seaborn
Illustrative Examples
Strategic price optimization using reinforcement learning
DQN learns a Hi-Lo pricing policy that switches between regular and discounted prices:
<p align="center"> <img src="https://github.com/ikatsov/tensor-house/blob/master/_resources/hilo-pricing-dqn-training-animation.gif" title="Price Optimization Using RL Animation"> </p>Supply chain optimization using reinforcement learning
DQN learns how to control procurement and logistics in a simulated environment:
<p align="center"> <img src="https://github.com/ikatsov/tensor-house/blob/master/_resources/demo-animation-world-of-supply.gif" title="Price Optimization Using RL Animation"> </p>Supply chain management using large language models
LLM dynamically writes a python script that invokes multiple APIs to answer user's question:
<p align="center"> <img src="https://github.com/ikatsov/tensor-house/blob/master/_resources/demo-animation-sc-control-tower.gif" title="Dynamic Scripting Using LLMs" width="90%"> </p>Anomaly detection in images using autoencoders
Deep autoencoders produce image reconstructions that facilitate detection of defect locations:
<p align="center"> <img src="https://github.com/ikatsov/tensor-house/blob/master/_resources/visual-anomaly-example.png" title="Anomaly Detection in Images"> </p>List of Prototypes and Templates
The artifacts listed in this section can help to rapidly evaluate different solution approaches and build prototypes using your datasets. Artifacts are marked with the following qualifiers:
- ๐งช - artifacts that are particularly suitable for exploratory data analysis, evaluating the strength of causal effects in your data, and determining whether these data is feasible for solving a certain use case or not
- ๐ - conceptual prototypes that use advanced methods and not necessarily suitable for productization
- ๐ - notebooks that demonstrate basic algorithms and intended mainly for educational purposes
Promotions, Offers, and Advertisements
These notebooks can be used to analyze the behavior of individual customers, calculate customer propensity (affinity) scores, and personalize offers, content, or digital experience.
- Customer Scoring and Lifetime Value
- Customer Propensity Scoring Using Deep Learning (LSTM with Attention) (notebook)
- Customer-level Uplift Modeling Based On Observational Data Using Causal Inference (notebook) (๐งช)
- Customer Lifetime Value (LTV) Estimation Using Markov Chains (notebook)
- Customer Lifetime Value (LTV) Estimation Using Bayesian Buy-Till-You-Die (BTYD) Model (notebook)
- Decision Automation
Marketing, Customer, and Content Analytics
The notebooks can be used to perform aggregated analysis of the customer population or segments, get insights from user-generated content, and optimize marketing budgets.
- Content Analytics
- Customer Behavior Analytics and Embeddings
- Media Mix, Attribution, and Budget Optimization
- Campaign Effect Estimation In Observational Data Using Causal Inference (notebook) (๐งช)
- Media Mix Modeling: Adstock Model for Campaign/Channel Attribution (notebook)
- Media Mix Modeling: Bayesian Model with Carryover and Saturation Effects (notebook) (๐งช)
- Multitouch Channel Attribution Model Using Deep Learning (LSTM with Attention) (notebook)
Search
These notebooks can be used to create enterprise search, product catalog search, and visual search solutions.
- Text Search
- Visual Search
- Structured Data Search
- Relational Data Querying Using LLMs (notebook)
- Data Preprocessing
- Product Attribute Discovery, Extraction, and Harmonization Using LLMs (notebook)
Recommendations
These notebooks can be used to prototype product recommendation solutions.
- Basic Collaborative Filtering
- Deep and Hybrid Recommenders
Demand Forecasting
These notebooks can be used to create demand and sales forecasting pipelines. These pipelines can further be used to solve inventory planning, price management, workforce optimization, and financial planning use cases.
- Traditional Methods
- Deep Learning Methods
- Dynamic Learning
- Bayesian Demand Models (notebook)
- Data Preprocessing
Pricing and Assortment
These notebooks can be used to create price optimization, promotion (markdown) optimization, and assortment optimization solutions.
- Static Price, Promotion, and Markdown Optimization
- Dynamic Pricing
Supply Chain
These notebooks and applications can be used to develop procurement and inventory allocation solutions, as well as provide supply chain managers with advanced decisions support and automation tools.
- Single-echelon Inventory Optimization Using (s,Q) and (R,S) Policies (notebook)
- Inventory Allocation Optimization (notebook)
- Multi-echelon Inventory Optimization Using Reinforcement Learning (DDPG, TD3) (notebook) (๐)
- Supply Chain Simulator for Reinforcement Learning Based Optimization (PPO) (notebook) (๐)
- Supply Chain Control Tower Using LLMs (notebook) (๐)
Smart Manufacturing
These notebooks can be used to prototype visual quality control and predictive maintenance solutions.
- Noise Reduction in Multivariate Timer Series Using Linear Autoencoder (PCA) (notebook)
- Remaining Useful Life Prediction Using Convolution Networks (notebook)
- Anomaly Detection in Time Series (notebook)
- Anomaly Detection in Images Using Autoencoders (notebook)
List of Questionnaires
These questionnaires can be used to assess readiness for typical AI/ML projects and collect the requirements for creating roadmaps and estimates.
- Demand Sensing and Forecasting (document)
- Price and Promotion Optimization (document)
- Next Best Action (document)
More Documentation
- The most basic models are described the Introduction to Algorithmic Marketing.
- Book's website - https://www.algorithmicmarketingbook.com/
- More advanced models that use deep learning and reinforcement learning techniques are described in The Theory and Practice of Enterprise AI.
- Book's website - https://www.enterprise-ai-book.com/
- Templates for basic data science and ML task are available in TensorHouseBasic repository.
- Most notebooks contain references to specific research papers, industrial reports, and real-world case studies.
- A manually curated list of important papers in enterprise AI.
- A manually curated list of public datasets related to enterprise use cases.
- Follow LinkedIn and X (Twitter) for notifications about new developments and releases.
Contribution
We warmly welcome contributions, such as implementations of new use cases, advanced features and usability improvements for existing use cases, or enhancements to documentation.