Logistic Regression(Machine Learning)
Logistic Regression is a Supervised Learning algorithm, used for classification. It is used to predict probability of Target Variable. It produces results in binary format. The outcome is discrete/categorical such as:
- Yes/No.
- 0/1.
- True/False.
- High/Low.
etc…
What it does?
It uses “Sigmoid Function” to give the outcomes. Just like the sigmoid curve, the outcomes can range from 0 to 1. Categorization is done on the basis of threshold value.
Let us suppose, the threshold value is 0.5 . Then, the values above it will be in ‘1’ category & values below it will be in ‘0’ category.
Applications
- Heart Attack Prediction.
- Credit Scoring
- Email Spam Non-Spam
and many more…
Using Logistic Regression
Way 1- Directly importing from scikit learn library in Python.
Input- from sklearn.linear_model import LogisticRegression
This imports the Logistic Model.
Way 2- Implementing Logistic Model from Scratch.
This was all about Logistic Regression algorithm.
Happy Learning Folks!
You can also visit my previous blogs by clicking on their name below-
- Google Colab
- Pandas
- NumPy
- Matplotlib
- OpenCV
- Data Preprocessing
- Linear Regression
- Decision Tree & Random Forest
- K-Nearest Neighbors
Follow me on LinkedIn- https://www.linkedin.com/in/imvat18/