Logistic regression is a statistical model that uses a logistic function to model a binary dependent variable. In geometric interpretation terms, Logistic Regression tries to find a line or plane…