Describe types of algorithms associated with ML, including:
logistic regression
Logistic regression is a supervised machine learning algorithm used to predict categorical outcomes, particularly binary classifications (e.g. yes/no, pass/fail, spam/not spam, cat/not cat).
While linear regression predicts numerical values, logistic regression outputs a probability between 0 and 1, which is then used to determine a class.
Features (input variables) are represented as binary values (0 or 1)
The target label is also binary (e.g., 1 for "cat", 0 for "not a cat")
Animal 4 Legs Whiskers Claws Is Cat
Animal 1 0 0 0 0
Animal 2 1 0 0 0
Animal 3 1 1 1 1
It uses a sigmoid function to calculate the probability that an input belongs to class 1.
𝑓(𝑥) = 1 / 1+𝑒⁻ˣ
The sigmoid function outputs values in the range (0, 1). A threshold (commonly 0.5) is used to classify:
≥ 0.5 → class 1 ("is a cat")
< 0.5 → class 0 ("not a cat")
Example:
If the model outputs 0.84, we classify the sample as "cat".
It's simple, efficient, and interpretable
Excellent for baseline binary classification tasks
Can be extended to multi-class problems (multinomial logistic regression)
Complete the Google Machine Learning Crash Course logistic regression module.