This application builds a model using H2O Wave ML to predict which Telco Customers are most likely to churn and why. Shapley values and partial dependence plots allow the user to understand why the model thinks each customer will or will not churn.
- Python 3.6+
- pip3
- JRE 11+ (needed to run H2O-3)
- NodeJS (Only needed for Run integration tests on local machine)
New to H2O Wave? We recommend starting in the documentation to download and run the Wave Server on your local machine. Once the server is up and running you can easily use any Wave app.
git clone [email protected]:h2oai/wave-apps.git
cd wave-apps/churn-risk
make setup
make run
Point your favorite web browser to localhost:10101
Optionally, you can run unit tests on this app
pytest # Run unit tests
pytest --cov=src --cov-report html # Run unit tests with coverage
This will generate a html report in htmlcov
directory.
Optionally, you can run integration tests on this app
- Go to your Wave folder downloaded in step 1 of Run app on local machine.
- Go to
test
folder inside Wave folder. - Run
npm install
- Go back to
churn-risk
app directory. - Here I assume I have Wave downloaded in my home directory. If you have an already running wave instance,
python3 ~/wave/test/cypress.py -m src.app
else if you want to launch a new Wave instance automatically,
python3 ~/wave/test/cypress.py -m src.app -w ~/wave/waved -wd ~/wave/www