Supervised Learning Algorithms
From Linear Models to Trees
Linear Regression
Linear regression predicts a numeric target using a weighted sum of inputs, often written as . It is simple, fast, and often a useful baseline.
Classification
Classification predicts discrete classes such as spam or not spam. Logistic regression, support vector machines, and decision trees are common supervised classification approaches.
Model Families
Linear Models
- Fast and interpretable
- Assume mostly linear relationships
- Often strong baselines
Tree-Based Models
- Handle nonlinear interactions
- Easy to visualize
- Can overfit without control
Which supervised learning task predicts a category?
Classification assigns inputs to discrete labels or categories.
Correct answer: Classification
What does a decision tree do at each internal node?
Decision trees recursively partition the feature space using rules.
Correct answer: It applies a rule or test to split the data into branches.
Common Algorithms
| Algorithm | Typical Use | Main Strength |
|---|---|---|
| Linear regression | Numeric prediction | Simplicity |
| Logistic regression | Binary classification | Interpretability |
| SVM | Classification | Margin maximization |
| Decision tree | Rules and branching decisions | Human-readable structure |
Which model is most directly associated with a weighted sum of inputs?
Linear regression explicitly uses a weighted sum to produce predictions.
Correct answer: Linear regression
Why are simple baseline models important?
Baselines prevent wasted effort on complex models that do not improve results.
Correct answer: They provide a performance reference and help reveal whether more complex methods are worthwhile.