{"id":20152155,"url":"https://github.com/mfurquimdev/predict-customer-churn-with-clean-code","last_synced_at":"2026-06-08T11:02:15.754Z","repository":{"id":59637318,"uuid":"535927742","full_name":"mfurquimdev/Predict-Customer-Churn-with-Clean-Code","owner":"mfurquimdev","description":"Udacity MLDevOps Engineer: Predict Customer Churn with Clean Code","archived":false,"fork":false,"pushed_at":"2022-10-06T18:37:45.000Z","size":4152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T01:18:28.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfurquimdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T02:27:23.000Z","updated_at":"2022-09-13T02:45:27.000Z","dependencies_parsed_at":"2023-01-19T12:40:45.227Z","dependency_job_id":null,"html_url":"https://github.com/mfurquimdev/Predict-Customer-Churn-with-Clean-Code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mfurquimdev/Predict-Customer-Churn-with-Clean-Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfurquimdev%2FPredict-Customer-Churn-with-Clean-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfurquimdev%2FPredict-Customer-Churn-with-Clean-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfurquimdev%2FPredict-Customer-Churn-with-Clean-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfurquimdev%2FPredict-Customer-Churn-with-Clean-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfurquimdev","download_url":"https://codeload.github.com/mfurquimdev/Predict-Customer-Churn-with-Clean-Code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfurquimdev%2FPredict-Customer-Churn-with-Clean-Code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34059157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T23:08:59.096Z","updated_at":"2026-06-08T11:02:15.727Z","avatar_url":"https://github.com/mfurquimdev.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Predict Customer Churn\n\n- Project **Predict Customer Churn** of ML DevOps Engineer Nanodegree Udacity\n\n## Project Description\n\nThis project takes a jupyter notebook and splits it into python scripts to facilitate the code's maintenance, and also running and sharing with colleagues.\nThe notebook loads and pre-process the data set of Bank Churners, runs some Exploratory Data Analysis and generates plots.\nIt also trains the models and plots the ROC curve to analyze the models' performance.\n\n## Files and data description\n\nYou should see a structure similar to the following:\n\n```\nPredict-Customer-Churn-with-Clean-Code/\n├── data/\n│   └── bank_data.csv\n├── images/\n│   ├── eda/\n│   │   ├── churn_distribution.png\n│   │   ├── customer_age_distribution.png\n│   │   ├── heatmap.png\n│   │   ├── marital_status_distribution.png\n│   │   └── total_transaction_distribution.png\n│   └── results/\n│       ├── feature_importance.png\n│       ├── logistic_regression_results.png\n│       ├── random_forest_results.png\n│       └── roc_curve_result.png\n├── library/\n│   ├── exceptions.py\n│   ├── logger.py\n│   ├── parameter.py\n│   ├── plots.py\n│   └── utils.py\n├── logs/\n│   └── churn_library.log\n├── models/\n│   ├── cv_rfc.pkl\n│   ├── lrc.pkl\n│   └── rfc.pkl\n├── tests/\n│   └── data/\n│       └── ...\n├── churn_library.py\n├── churn_notebook.ipynb\n├── env.example\n├── Guide.ipynb\n├── hotload_unittest.sh\n├── Pipfile\n├── Pipfile.lock\n├── README.md\n├── requirements.txt\n└── test_churn_library.py\n\n10 directories, 44 files\n```\n\nThe jupyter notebook was split into a few scripts which resides part on `churn_library.py` and a few auxiliary scripts on `library`.\nThe `churn_library.py` script has a `main()` function which is responsible for executing each function from loading the data up to training the models.\nThe data is stored under `data` with the name `bank_data.csv`.\nAll the images are stores in the `images` directory.\nIf this script have already been ran, the models as stored under `models`.\nThe unit tests are inside the ` test_churn_library.py` script.\n\n## Running Files\n\nThis project was developed under python 3.8.\nAfter installing this version (you can have multiple versions with [pyenv](https://github.com/pyenv/pyenv)),\ninstall the dependencies with:\n```\npipenv install --dev\n```\n\nFirst, see if you can run the unit tests with the following:\n```\npipenv run unittests\n```\n\nAfter that, you can run the script `execute` under Pipfile by issuing the following command on the terminal:\n```\npipenv run execute\n```\n\nThis should start the `churn_library.py` script with the `main()` function which will load the csv, generate a few EDA plots, train the model and plot the ROC curve.\n\nTake a look at the log under `logs` and the plots under `images/eda` and `images/results`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfurquimdev%2Fpredict-customer-churn-with-clean-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfurquimdev%2Fpredict-customer-churn-with-clean-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfurquimdev%2Fpredict-customer-churn-with-clean-code/lists"}