Logistic regression solves problems that require the target variable to be a discrete value / categorical target variable. For example, a person's gender (male or female) can be a discrete output variable.
Even though a continuous outcome variable generated in linear regression can be converted to a categorical variable, it is not advisable to do so as it can drastically reduce the precision of the results.
Logistic regression can be applied in any of the following situations:
The fundamental principle behind the logistic regression algorithm (using the maximum likelihood estimation) ...