Ml Assignment Kv2
Ml Assignment Kv2
Introduction
3. Mathematical Foundation
This converts the output into a probability between 0 and 1. If the result is ≥
0.5, we classify it as 1 (positive class); otherwise, 0.
At z = 0, output is 0.5
As z → ∞, output → 1
As z → -∞, output → 0
This output probability helps classify inputs. The decision boundary is the
point where the model decides between class 0 and class 1 (usually at 0.5).
5. Types of Logistic Regression
Used when the outcome has more than two unordered categories.
Output Range -∞ to +∞ 0 to 1
Cost Function Mean Squared Error (MSE) Log Loss / Cross Entropy
8. Evaluation Metrics
1. Accuracy:
2. Precision:
\frac{TP}{TP + FP}
3. Recall (Sensitivity):
\frac{TP}{TP + FN}
4. F1-Score:
5. Confusion Matrix:
A matrix showing True Positives, False Positives, True Negatives, and False
Negatives.
L1 Regularization (Lasso):
Can shrink some weights to zero (feature selection).
L2 Regularization (Ridge):
Loan Approval:
Advantages:
Interpretable output.
Limitations:
14. Conclusion
Logistic regression is a foundational classification technique in machine
learning. It’s widely used due to its simplicity, efficiency, and ability to
handle binary outcomes effectively. With proper evaluation and
preprocessing, logistic regression can produce powerful results in real-world
applications across industries.
15. References
4. Analytics Vidhya