{"id":21352180,"url":"https://github.com/kennethleungty/logistic-regression-assumptions","last_synced_at":"2025-07-12T21:30:40.177Z","repository":{"id":45635784,"uuid":"411726613","full_name":"kennethleungty/Logistic-Regression-Assumptions","owner":"kennethleungty","description":"Assumptions of Logistic Regression, Clearly Explained","archived":false,"fork":false,"pushed_at":"2022-05-14T00:05:23.000Z","size":1917,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-05T18:11:18.400Z","etag":null,"topics":["logistic-regression","logistic-regression-algorithm","logistic-regression-assumptions","logistic-regression-classifier","logistic-regression-implementation","logistic-regression-models","python","statistics"],"latest_commit_sha":null,"homepage":"https://towardsdatascience.com/assumptions-of-logistic-regression-clearly-explained-44d85a22b290","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/kennethleungty.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":"2021-09-29T15:21:04.000Z","updated_at":"2023-01-04T04:57:55.000Z","dependencies_parsed_at":"2022-09-15T17:40:21.365Z","dependency_job_id":null,"html_url":"https://github.com/kennethleungty/Logistic-Regression-Assumptions","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethleungty%2FLogistic-Regression-Assumptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethleungty%2FLogistic-Regression-Assumptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethleungty%2FLogistic-Regression-Assumptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethleungty%2FLogistic-Regression-Assumptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennethleungty","download_url":"https://codeload.github.com/kennethleungty/Logistic-Regression-Assumptions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225834368,"owners_count":17531471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["logistic-regression","logistic-regression-algorithm","logistic-regression-assumptions","logistic-regression-classifier","logistic-regression-implementation","logistic-regression-models","python","statistics"],"created_at":"2024-11-22T03:12:53.563Z","updated_at":"2024-11-22T03:12:54.077Z","avatar_url":"https://github.com/kennethleungty.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assumptions of Logistic Regression, Clearly Explained\n#### Understanding and implementing the assumption checks behind one of the most important statistical techniques in data science - Logistic Regression\n- Link to TowardsDataScience article: https://towardsdatascience.com/assumptions-of-logistic-regression-clearly-explained-44d85a22b290\n- Logistic regression is a highly effective modeling technique that has remained a mainstay in statistics since its development in the 1940s.  \n- Given its popularity and utility, data practitioners should understand the fundamentals of logistic regression before using it to tackle data and business problems.  \n- In this project, we explore the key assumptions of logistic regression with theoretical explanations and practical Python implementation of the assumption checks.    \n___\n\n### Contents\n**(1) Logistic_Regression_Assumptions.ipynb**\n- The main notebook containing the Python implementation codes (along with explanations) on how to check for each of the 6 key assumptions in logistic regression\n\n**(2) Box-Tidwell-Test-in-R.ipynb**\n- Notebook containing R code for running Box-Tidwell test (to check for logit linearity assumption)\n\n**(3) /data**\n- Folder containing the public Titanic dataset (train set)\n\n**(4) /references**\n- Folder containing several sets of lecture notes explaining advanced regression\n___\n### Special Thanks\n- @dataninj4 for correcting imports and adding .loc referencing in diagnosis_df cell so that it runs without errors in Python 3.6/3.8\n- @ArneTR for rightly pointing out that VIF calculation should include a constant, and correlation matrix should exclude target variable\n___\n\n### References\n- [Machine Learning Essentials - Practical Guide in R](http://www.sthda.com/english/articles/36-classification-methods-essentials/148-logistic-regression-assumptions-and-diagnostics-in-r/)\n- [Logistic and Linear Regression Assumptions - Violation Recognition and Control](www.lexjansen.com/wuss/2018/130_Final_Paper_PDF.pdf)\n- [Testing linearity in the logit using Box-Tidwell Transformation in SPSS - Youtube](https://www.youtube.com/watch?v=sciPFNcYqi8\u0026ab_channel=MikeCrowson)\n- [Logistic Regression using SPSS](https://www.researchgate.net/publication/344138306_Logistic_Regression_Using_SPSS)\n- [Statistics How To - Cook's Distance](https://www.statisticshowto.com/cooks-distance/)\n- [Statsmodels Documentation - GLM](https://www.statsmodels.org/stable/glm.html)\n- [Statsmodels Documetation - Logit Influence example notebook](https://www.statsmodels.org/dev/examples/notebooks/generated/influence_glm_logit.html)\n- [PennState Eberly College of Science - Stat 462](https://online.stat.psu.edu/stat462/node/173/)\n- [Statistics Solution - Assumptions of Logistic Regression](https://bookdown.org/jefftemplewebb/IS-6489/logistic-regression.html#fn40)\n- [Course Notes for IS 6489 - Statistics and Predictive Analytics](https://bookdown.org/jefftemplewebb/IS-6489/logistic-regression.html#fn40)\n- [MSc in Big Data Analytics at Carlos III University of Madrid - Notes for Predictive Modeling](https://bookdown.org/egarpor/PM-UC3M/)\n- [Freakonometrics - Residuals from a Logistic Regression](https://freakonometrics.hypotheses.org/8210)\n- [Kaggle - Titanic - Logistic Regression with Python](https://www.kaggle.com/mnassrib/titanic-logistic-regression-with-python)\n- [Yellowbrick API Reference - Cook's Distance](https://www.scikit-yb.org/en/latest/api/regressor/influence.html?highlight=cook#module-yellowbrick.regressor.influence)\n- [DataCamp - Understanding Logistic Regression in Python](https://www.datacamp.com/community/tutorials/understanding-logistic-regression-python)\n- [Statology - How to Calculate Cook's Distance](https://www.statology.org/cooks-distance-python/)\n- [ResearchGate - Box-Tidwell Test in SPSS](https://www.researchgate.net/post/What_is_the_correct_way_to_do_Box-Tidwell_test_in_SPSS_for_logistic_regression)\n- [CrossValidated - Why include x ln x interaction term helps](https://stats.stackexchange.com/questions/217471/why-does-including-x-lnx-interaction-term-in-logistic-regression-model-helps)\n- [UCLA IDRE - Logistic Regression Diagnostics](https://stats.idre.ucla.edu/stata/webbooks/logistic/chapter3/lesson-3-logistic-regression-diagnostics-2/)\n- [Logistic and Linear Regression Assumptions: Violation Recognition and Control](https://www.lexjansen.com/wuss/2018/130_Final_Paper_PDF.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethleungty%2Flogistic-regression-assumptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennethleungty%2Flogistic-regression-assumptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethleungty%2Flogistic-regression-assumptions/lists"}