Logistic regression is a supervised machine learning algorithm which can be used for performing classification problems. It calculates the probability that a given value belongs to a specific class. If the probability is more than 50%, it assigns the value in that particular class else if the probability is less than 50%, the value is assigned to the other class. Therefore, we can say that logistic regression acts as a binary classifier.
Theoretical Explanation Part 1
Theoretical Explanation Part 2
Theoretical Explanation Part 3
Interview Questions on Logistic Regression
1. What Are the Basic Assumption?
- Linear Relation between independent features and the log odds
2. Advantages
Advantages of Logistics Regression
- Logistic Regression Are very easy to understand
- It requires less training
- Good accuracy for many simple data sets and it performs well when the dataset is linearly separable.
- It makes no assumptions about distributions of classes in feature space.
- Logistic regression is less inclined to over-fitting but it can overfit in high dimensional datasets.One may consider Regularization (L1 and L2) techniques to avoid over-fittingin these scenarios.
- Logistic regression is easier to implement, interpret, and very efficient to train.
3. Disadvantages
- Sometimes Lot of Feature Engineering Is required
- If the independent features are correlated it may affect performance
- It is often quite prone to noise and overfitting
- If the number of observations is lesser than the number of features, Logistic Regression should not be used, otherwise, it may lead to overfitting.
- Non-linear problems can’t be solved with logistic regression because it has a linear decision surface. Linearly separable data is rarely found in real-world scenarios.
- It is tough to obtain complex relationships using logistic regression. More powerful and compact algorithms such as Neural Networks can easily outperform this algorithm.
- In Linear Regression independent and dependent variables are related linearly. But Logistic Regression needs that independent variables are linearly related to the log odds (log(p/(1-p)).
4. Whether Feature Scaling is required?
yes
5. Missing Values
Sensitive to missing values
6. Impact of outliers?
Like linear regression, estimates of the logistic regression are sensitive to the unusual observations: outliers, high leverage, and influential observations. Numerical examples and analysis are presented to demonstrate the most recent outlier diagnostic methods using data sets from medical domain
Types of Problems it can solve(Supervised)
- Classification
Practical Implementation
Performance Metrics
Classification
- Confusion Matrix
Precision,Recall, F1 score
Download All the materials from here
If you are looking for affordable tech course such as data science, machine learning, deep learning,cloud and many more you can go ahead with iNeuron oneneuron platform where you will able to get 200+ tech courses at an sffordable price for a lifetime access.
