Tensor by Tensor

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

  1. A linear classifier makes a score. Suppose the chosen weights turn features [2,1] into score 1.
  2. The sigmoid function maps that score to 1/(1+e⁻¹) = 0.731.
  3. So the positive class gets 0.731. The negative class gets 1−0.731 = 0.269.
  4. A multilayer perceptron (MLP) adds hidden layers and nonlinear activation functions.
  5. Common mistake: raw scores are not probabilities. Apply the correct output rule or loss.
Open the detailed notes ↗