Skip to content

Using lifetimes package to compute value and providing a demo via a web service.

License

Notifications You must be signed in to change notification settings

olaoluthomas/ltv_btyd_demo

Repository files navigation

bbby_btyd


A probabilistic approach to estimating customer lifetime value using the "Buy 'Til You Die" methodology via the PyPI Lifetimes package.

Create a docker image from instructions in the Dockerfile to perform a prediction on a single row of data submitted via HTML form (as a demo).

In the directory that holds the Dockerfile, you can run a demo that makes a prediction from data collected via an HTML form.

To build the docker image, run

docker build -t <image_name> .
For example,

$ docker build -t ltv_image .

To create a container from the image, run

docker run -it --name -p 8080:8080 <image_name>
For example,

$ docker run -it --name ltv_container -p 8080:8080 ltv_image

Then navigate to localhost:8080 and you'll be taken to the website's homepage.
To submit data via an HTML form, simply click on "User Input".

Have fun!!!

More revisions to follow...

Documentation on the Lifetimes package can be found here or downloaded here.


Credit to Cameron Davidson-Pilon (GitHub).

About

Using lifetimes package to compute value and providing a demo via a web service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published