Classical Machine Learning

Measure the boundary's margin violations

Correct labels can have different margin losses

A boundary can classify every part correctly while leaving some too close to its margin. Botie needs a loss that notices this shortfall.

BOTIE

Both the narrow-score example and the beyond-margin example have correct score signs. Why can their mean hinge losses differ?
The inputs we are comparing

Part measurements by row

Narrow scores

-2
-1
1
2

Beyond the margin

-2
2

Boundary weights

Narrow scores

  1. 00.5

Beyond the margin

  1. 01

Boundary bias

Same in both cases

0

Known labels: -1 or +1

Narrow scores

  1. 0-1
  2. 1-1
  3. 21
  4. 31

Beyond the margin

  1. 0-1
  2. 11
Result for narrow scores
0.25
Choose an explanation to test
A part lands directly on the decision boundary

This check uses the pieces from “Average only positive margin shortfalls”.

BOTIE

Two labelled parts reach their margins and one positive part has score zero. Predict the mean hinge loss of this supplied boundary.
Part measurements by row
-1
0
1
Boundary weights
  1. 01
Boundary bias
0
Known labels: -1 or +1
  1. 0-1
  2. 11
  3. 21

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

How can the loss distinguish a wrong-side part from a correct-but-close part, and what term would a full SVM objective still need?

A classifier's training objective may depend on score magnitude as well as whether its predicted class is correct.

The weights are supplied, not fitted. A full SVM objective also penalises their norm, and its score is not a calibrated probability.

Work through the Python challenges →
Continue the courseBagging →
← Naive Bayes