1/17
This is binary classification
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Logistic regression is a
Logistic regression predicts binary outcomes by modelling the probability using a
logistic function. (Classification mode)
Example of logistic regression
Spam or not spam
What is a Confusion Matrix in Multiclass Classification?
A confusion matrix for multiclass classification is a table that allows the visualization of the performance of a classification model by comparing predicted labels with actual labels across all classes.
For a multiclass problem with N classes, the matrix is an table where: Rows represent the true classes (actual labels). Columns represent the predicted classes (model's output). From this matrix, various metrics like accuracy, precision, recall, and F1 score can be calculated for each class individually
Sqaush line
Making the line limit the value beteween 0 & 1.
Logit Model
if op is between 0 & 1 (Logistic regrssion) then we call logit model. this happen when we attach sigmoid to the logistic regression.
Sigmoid function
This is help in calssifying the data with boundaries
Its range is 0 to 1.
Formula of sigmoid
How Logistic Regression Handles Classification Problems:
Logistic regression is a linear model that predicts probabilities for binary or multi-class classification problems. Instead of fitting a straight line, it uses the logistic (sigmoid) function to map the output of a linear equation to a probability range between 0 and 1.
Maximum Likelihood Estimation (MLE) vs Maximum a Posteriori Estimation (MAP):
MLE is purely data-driven, while MAP combines data with prior knowledge (e.g., from past observations or expert opinions).
what will be the output for each different z values
z = infintire then op is 1
z = 0 then op is 0.5
z = infinite then op is infinite
if we have 2 classes then its called
Binary classification
Ex : Dog 🐶 & Cat 🙀
when we have a lot of classes
Multiclass classification
multip label classification
we can see many label in same images
Type 1 vs Type 2
random state
This will give the distribution of data each time the same.
Hyperparameter tuning of the losgistic regression
Grid search cv This will find the best parameters . But this take long time
Random Search Cv - This will take less time as this just take sample of data.
How will you measure goodness of fit for logistic regression ?
Confusion Matrix and Classification Metrics
Softmax
multiclass classification algorithms used by logistic regression.
Algorithm/Context | Role of Softmax |
Multinomial Logistic Regression | Converts logits into probabilities for multiple classes. |
Neural Networks (e.g., CNNs, RNNs) | Used in the output layer for multiclass classification. |
Natural Language Processing (NLP) | Converts model outputs into probabilities for text classification. |