Understand Logistic Regression for Effective Classification

logistic regression n.w
1 / 20
Embed
Share

Learn about logistic regression, a classification technique in machine learning, that helps predict categorical variables. Explore topics like binary classification, sigmoid function, odds, and building regression models in Python. Discover the power of univariate and multivariate logistic regression in making accurate predictions.

  • Logistic Regression
  • Classification Techniques
  • Machine Learning
  • Python
  • Binary Classification

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Logistic Regression

  2. Introduction: Logistic Regression is another technique for machine learning from the field of statistics. In the Linear regression model used to make predictions for continuous variables (numeric variable). Logistic regression is a classification model. It will help you make predictions in cases where the output is a categorical variable. Logistic regression is easy to interpretable of all classification models. It is very common to use various industries such as banking, healthcare, etc. The topics that will be covered in this section are: Binary classification Sigmoid function Likelihood function Odds and log-odds Building a univariate/multivariate logistic regression model in Python

  3. Binary Classification In the classification problems, the output is a categorical variable. For example: A finance company lends out the loan to the customer wants to know if he will default or not. An email message, you want to predict Spam or ham message. We have an email and we want to categorize into Primary, Social, Promotions. The classification model enables us to extract a similar pattern of the data. And classify into different categories. The classification problem where we have two possible output is Binary classification.

  4. Univariate Logistic Regression

  5. Take the example from Table-1. Observations We need to predict a person is diabetic or not. So now we have plotted the blood sugar on the x-axis and diabetes on the y-axis. As we can see in the 1st image. Red points show non-diabetics and the blue point show diabetic person. We can decide based on the decision boundary as we can see in image-2. We could say that all person with sugar level more the 210 is diabetics. And the patient with less than 210 sugar level is non-diabetic.

  6. So in that case out prediction represents a curve shown in the image-3. But there is a problem in this curve we misclassified 2 points. So now the question is, Is there a decision boundary that helps us with zero is classification. Ans is there is none. The best case would be the one with a cutoff around 195 in image-4, So there would be one miss classification.

  7. Multivariate Logistic Regression .. .. .. .. ..

  8. -The precision is the ratio tp / (tp + fp) where tp is the number of true positives and fp the number of false positives. The precision is intuitively the ability of the classifier to not label a sample as positive if it is negative. -The recall is the ratio tp / (tp + fn) where tp is the number of true positives and fn the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples. -The F-beta score can be interpreted as a weighted harmonic mean of the precision and recall, where an F-beta score reaches its best value at 1 and worst score at 0. -The F-beta score weights the recall more than the precision by a factor of beta. beta = 1.0 means recall and precision are equally important.

  9. REFERENCES: - https://www.nucleusbox.com/logistic-regression-for-machine-learning-using-python/#likelihood- function - API Reference: https://www.statsmodels.org/stable/api.html - https://towardsdatascience.com/building-a-logistic-regression-in-python-step-by-step-becd4d56c9c8 - https://www.reneshbedre.com/blog/logistic- regression.html#:~:text=Univariate%20logistic%20regression%20has%20one,function%20of%20the% 20independent%20variables.

Related


More Related Content