{"id":49396455,"url":"https://github.com/tharuniiii/customer-churn-analysis","last_synced_at":"2026-04-28T16:01:55.727Z","repository":{"id":315252594,"uuid":"1058736612","full_name":"Tharuniiii/Customer-churn-analysis","owner":"Tharuniiii","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-17T13:49:20.000Z","size":936,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-17T15:35:23.702Z","etag":null,"topics":["gradient-boosting","machine-learning-algorithms","python","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tharuniiii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-17T13:35:49.000Z","updated_at":"2025-09-17T13:50:52.000Z","dependencies_parsed_at":"2025-09-18T17:01:36.051Z","dependency_job_id":null,"html_url":"https://github.com/Tharuniiii/Customer-churn-analysis","commit_stats":null,"previous_names":["tharuniiii/customer-churn-analysis"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Tharuniiii/Customer-churn-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharuniiii%2FCustomer-churn-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharuniiii%2FCustomer-churn-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharuniiii%2FCustomer-churn-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharuniiii%2FCustomer-churn-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tharuniiii","download_url":"https://codeload.github.com/Tharuniiii/Customer-churn-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharuniiii%2FCustomer-churn-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gradient-boosting","machine-learning-algorithms","python","streamlit"],"created_at":"2026-04-28T16:01:52.498Z","updated_at":"2026-04-28T16:01:55.717Z","avatar_url":"https://github.com/Tharuniiii.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer-churn-analysis\n\n# Project Overview\n\nThis app allows users to input customer attributes (demographic, services, contract, billing) and instantly get a prediction whether the customer will churn. Predictions are produced by a saved classifier loaded with joblib in app.py\n\n# Features\n\nInteractive Streamlit UI for collecting customer attributes.\n\nPreprocessing of categorical variables (mapping string categories to integers).\n\nLoads a pre-trained model and makes single-instance predictions.\n\nClear output: \"likely to churn\" or \"likely to stay\".\n\n# Files\napp.py — Streamlit application and input preprocessing. \n\nfinal_gb_classifier.pkl — pre-trained Gradient Boosting model (expected by app.py)\n\nPrerequisites\n\nPython 3.9+ recommended.\n\npip for package management.\n\nA local copy of the trained model file final_gb_classifier.pkl.\n\n# Installation \u0026 Setup\n\nClone or copy the project folder to your machine.\n\nCreate and activate a virtual environment (recommended)\n\n# How to Run Locally\n\nImportant: By default app.py loads the model from an absolute path:\n\nmodel = joblib.load(r\"C:\\Users\\Tharuni\\Desktop\\projects\\customer churn analysis Gradientboost\\final_gb_classifier.pkl\")\n\n# Run the app\nstreamlit run app.py\n\n# Usage\n\nUse the radio/select inputs to provide customer features (gender, services, contract, payment method, charges, tenure group, etc.).\n\nClick Predict.\n\nThe app displays whether the customer is likely to churn or stay.\n\nThe app expects categorical inputs as strings for some fields (e.g., Internet Service, Contract, Payment Method) and maps them internally to numeric codes — this mapping is defined in preprocess_input() inside app.py.\n\n# Model \u0026 Preprocessing Details\n\nModel\n\nThe Streamlit app loads a joblib-serialized model final_gb_classifier.pkl. The model was trained externally and saved to disk; app.py loads it to make predictions. \n\nPreprocessing (as implemented in app.py)\n\nInternetService mapping: 'DSL' -\u003e 0, 'Fiber optic' -\u003e 1, 'No' -\u003e 2. \n\nContract mapping: 'Month-to-month' -\u003e 0, 'One year' -\u003e 1, 'Two year' -\u003e 2. \n\nPaymentMethod mapping:\n'Electronic check' -\u003e 0, 'Mailed check' -\u003e 1, 'Bank transfer (automatic)' -\u003e 2, 'Credit card (automatic)' -\u003e 3.\n\n# How to Retrain / Replace Model\n\nTrain your classifier in a separate script / notebook using the same features and preprocessing mappings.\n\nSave the model with joblib.dump(model, \"final_gb_classifier.pkl\").\n\nReplace the existing final_gb_classifier.pkl file in your project folder (or edit the path in app.py to point to the new file).\n\nRun streamlit run app.py to verify predictions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharuniiii%2Fcustomer-churn-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftharuniiii%2Fcustomer-churn-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharuniiii%2Fcustomer-churn-analysis/lists"}