Classical Machine Learning

Is the closest match convincing?

The second candidate nearly ties the first

A descriptor always has some nearest candidate, but a nearly tied second candidate makes that match ambiguous. Botie needs a relative distance check.

BOTIE

The nearest descriptor is distance 1 away and the second is distance 1.1 away. Why should the match fail the supplied 0.8 ratio test?
The inputs we are comparing

Query descriptor

Same in both cases

  1. 00
  2. 10

Candidate descriptors

Example 1

10
30
50

Example 2

10
1.10
50
Result for example 1
1
Choose an explanation to test
The descriptor ratio reaches the cutoff exactly

This check uses the pieces from “Require the nearest descriptor to be clearly closer”.

BOTIE

Predict whether the best descriptor passes the existing strict 0.8 distance-ratio test. Compare Euclidean distances, accounting for the squared distances supplied by the distance tool.
Query descriptor
  1. 01
  2. 11
Candidate descriptors
51
61
111

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.

Why does a close runner-up matter more than a very distant third candidate, and why do the square roots belong before the ratio comparison?

A nearest-match decision may need an ambiguity test in the same distance convention as its stated threshold.

This is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out.

Work through the Python challenges →
Continue the courseImage Alignment →
← Histogram of Oriented Gradients