Giter VIP home page Giter VIP logo

marketing_mix_modeling's Introduction

Marketing Mix Modeling

For collaborating and developing Bayesian MMM models in PyMC

Dev Container

To help with reproducibility in this projectdo, the provided Dockerfile is intended to be used in a Visual Studio (VS) Code devcontainer.

Key features:

  • Python 3.11
  • Conda environment with PyMC 5+
  • Jupyter Notebook integration
  • Access to local data sets
  • DuckDB for working with Parquet

Prerequisites:

Getting started:

  1. Open VS Code and make sure to have the Dev Containers extension installed.
dev container extension
  1. Set the environment variable MMM_DATA_PATH=/local/path/to/data/directory. This variable will need to point to a valid directory in order to build the dev container. See the "Incorporating Data" section below.

  2. Open repo folder in a dev container. The contents of the .devcontainer folder configure the container using Dockerfile. The Docker image will need to be built from scratch the first time, so be patient.

initiate dev container
  1. The dev container is configured to edit and run Jupyter notebooks directly within VS Code. Test out your new environment by opening notebook example/pymc_mmm.ipynb. Select the mmm kernel to use the installed Conda environment.
select python environment

Incorportating Data

Please keep this repo free of data, credentials and other secrets (one exception being data accompanying example notebook). Instead, the dev container is setup to use an environment variable MMM_DATA_PATH to access datasets outside this repo. When the dev container gets built, the contents of your local folder will get mounted to /root/data within the container. Try it out with example/using_data.ipynb.

Updating Dependencies

To avoid dependency drift, we version control environment.yml. This also avoids us have to re-solve the environment each time we rebuild the dev container, which can take a lot of time.

Here's the recommended way to update dependencies:

  1. cp environment.yml environment-dev.yml (the latter is not version controlled)
  2. mamba env update --file environment-dev.yml --prune (using mamba to solve the environment is much faster)
  3. test the code
  4. mamba env export --name mmm --file environment.yml
  5. open a PR

marketing_mix_modeling's People

Contributors

amanderson avatar ferrarijefferson avatar

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.