https://github.com/olaoluthomas/ltv_btyd_demo
Using lifetimes package to compute value and providing a demo via a web service.
https://github.com/olaoluthomas/ltv_btyd_demo
data-science docker flask python
Last synced: 3 months ago
JSON representation
Using lifetimes package to compute value and providing a demo via a web service.
- Host: GitHub
- URL: https://github.com/olaoluthomas/ltv_btyd_demo
- Owner: olaoluthomas
- License: mit
- Created: 2021-06-27T19:09:44.000Z (about 5 years ago)
- Default Branch: dev
- Last Pushed: 2024-12-17T19:45:03.000Z (over 1 year ago)
- Last Synced: 2024-12-17T20:33:03.375Z (over 1 year ago)
- Topics: data-science, docker, flask, python
- Language: Python
- Homepage:
- Size: 181 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 .
For example,
```
$ docker build -t ltv_image .
```
To create a container from the image, run
docker run -it --name -p 8080:8080
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](https://lifetimes.readthedocs.io/en/latest/) or downloaded [here](https://readthedocs.org/projects/lifetimes/downloads/pdf/latest/).
---
Credit to [Cameron Davidson-Pilon (GitHub)](https://github.com/CamDavidsonPilon/lifetimes).