02.07 · UNIT 02 · Supervised learning and reliable experiments · Lab
From logistic regression to nonlinear MLPs
Logistic regression turns one score into class probabilities. An MLP adds nonlinear layers.
PLAIN-LANGUAGE INTRODUCTION
What is this?
Logistic regression turns one score into class probabilities. An MLP adds nonlinear layers.
One simple example
A score of 1 becomes positive probability 0.731. The negative probability is 0.269.
What goes in?
Numeric features, such as positive-word count 2 and negative-word count 1.
What comes out?
A probability for each class.
Why does it matter?
Probabilities support classification. Nonlinear layers can learn curved decision boundaries.
What is it not?
A probability is not proof that the class is correct.
WORK THROUGH THE IDEA
See the idea in more detail
- A linear classifier makes a score. Suppose the chosen weights turn features
[2,1]into score1. - The sigmoid function maps that score to
1/(1+e⁻¹) = 0.731. - So the positive class gets
0.731. The negative class gets1−0.731 = 0.269. - A multilayer perceptron (MLP) adds hidden layers and nonlinear activation functions.
- Common mistake: raw scores are not probabilities. Apply the correct output rule or loss.