Classical Machine Learning

Find the points that can grow a group

BOTIE

Form the pairwise distance table, include distances at or below the radius and total each neighbourhood row.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.

Try your own inputs

Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Form the pairwise distance table, include distances at or below the radius and total each neighbourhood row.

Botie's sensor locations need a local density test before he can connect dense regions. A point counts itself among its neighbours.

Inspect the component calculation
Add each row(
  Rows of numbers: Mark neighbours within a radius(
    Distance grid: Measure all pairwise distances(
      Position rows: Sensor locations by row
    )
    Neighbour radius: Neighbourhood radius
  )
)
Examples and results
Sensor locations by row
0
0.1
0.2
0.4
Neighbourhood radius
0.21
Required result
  1. 03
  2. 13
  3. 24
  4. 32
Sensor locations by row
00
34
Neighbourhood radius
1
Required result
  1. 01
  2. 11
Try a fresh construction

This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.

Stuck? Inspect a worked construction

The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.

Assumptions and test precision

Core detection is one part of DBSCAN. This result does not assign cluster IDs or attach border points, and density settings need validation against the intended task. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.

Neighbours exactly at the radius

This check uses the pieces from “Mark the locations that meet the density requirement”.

BOTIE

Three sensor positions lie one unit apart and a fourth is distant. Predict the core-point indicators when the radius includes its boundary and the minimum count includes the point itself.
Sensor locations by row
0
1
2
6
Neighbourhood radius
1
Minimum count including self
3

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.

Which non-core locations still lie next to the core, and why does the core mask alone not supply their final DBSCAN labels?

Separate local density tests from connecting cores and assigning border points to clusters.

Core detection is one part of DBSCAN. This result does not assign cluster IDs or attach border points, and density settings need validation against the intended task.

Work through the Python challenges →
Continue the courseThe Kernel Trick →
← Hierarchical Clustering