Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/armandgiraud/betclick


https://github.com/armandgiraud/betclick

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

# Betclick Churn Analysis
This repo contains an Assignment for betclick

### Install:
- clone the repo
- `pip install -r "requirements.txt"``
- `cd ./src`

---
Run with docker:

change env variable `PASSWORD` in docker-compose
`sudo docker-compose up --build`

### Fit

- fit the model on data using:
```python main.py```

The script will:
- download the data, and optionnally ask a password for unzipping
- label the data and drop leaky rows
- preprocess and write serializables necessary for inference on disk

### Predict

`python main.py --predict`

- predict whether each customer in a subsample of the dataset is a potential churner.
- write a file on disk in the preds folder
the first column rerpresents customer_key
the second column is the target

| customer_key | is_churner |
|--------------|------------|
| 10390929 | True |
| 10390926 | True |
| 10390926 | False |
| 10390926 | True |
| 10390926 | False |
| 10390926 | False |

#### Predict on private dataset

`python main.py --predict --private_file "my_data_file.csv"`

The data should have the same format as the original one, it might be necessary to handle mix typed columns.