Skip to content

Code for logistic regression classification from scratch. This project helps one understand the inner workings of this classification algorithm.

License

Notifications You must be signed in to change notification settings

shahiryar/Logistic-Regression

Repository files navigation

Logistic-Regression

Code for logistic regression classification from scratch. This project helps one understand the inner workings of this classification algorithm.

Introduction to Logistic Regression Classification

Logistic Regression Classification is a fundamental technique in machine learning used for solving classification problems. It is a type of regression analysis that is used when the dependent variable is dichotomous or binary in nature, which means that it can take only two possible values. In logistic regression classification, we use a logistic function to model the relationship between the input variables and the output binary variable. This function is also known as the sigmoid function, and it outputs a value between 0 and 1, which can be interpreted as the probability of the binary outcome.

Underlying Assumptions

  • The dependent variable is binary or dichotomous in nature.
  • The observations are independent of each other.
  • There is a linear relationship between the independent variables and the logit transformation of the dependent variable.
  • The error terms are independent and identically distributed.

Limitations

  • Logistic regression assumes a linear relationship between the independent variables and the logit transformation of the dependent variable. If this assumption is violated, the model may not fit the data well.
  • Logistic regression assumes that the observations are independent of each other. If there is dependence between the observations, the model may not provide accurate predictions.
  • Logistic regression assumes that there are no outliers in the data. Outliers can have a significant impact on the model's performance.
  • Logistic regression is not suitable for problems where the relationship between the independent variables and the dependent variable is non-linear.
  • Logistic regression may suffer from overfitting or underfitting if the model is too complex or too simple, respectively.
  • Logistic regression may not perform well when there are many independent variables, especially if some of them are irrelevant or highly correlated with each other.

Applications of Logistic Regression Classification

Logistic Regression Classification is widely used in many areas such as finance, healthcare, and marketing, where predicting binary outcomes is of great importance. For example, in healthcare, logistic regression classification can be used to predict whether a patient will develop a particular disease or not based on their medical history and other relevant factors. In finance, logistic regression classification can be used to predict whether a loan applicant is likely to default on their loan or not. In marketing, it can be used to predict whether a customer is likely to purchase a particular product or not.

How to use

The logisticRegression library contains three major modules: model_selection : for functions like test train split prep : for preprocessing of data regressor : the regression class

About

Code for logistic regression classification from scratch. This project helps one understand the inner workings of this classification algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages