Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.dbscan

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/dbscan.clj1 definitions, 3 theorems

AHoF DBSCAN (Density-Based Spatial Clustering of Applications with Noise): find clusters of arbitrary shape as dense regions separated by sparse ones, labelling low-density points as noise -- without needing the number of clusters in advance. The engine is the CORE-POINT test: a point is a core point (the seed of a cluster) when its epsilon-neighborhood contains at least minPts points: is-core? neighbor-count min-pts = decide (min-pts <= neighbor-count) over exact-rational (integer) counts. Proved native and axiom-free: the core-point test; that a point in a dense region is a core point; the certificate that a core point really has at least minPts neighbors (native nnrat/at-most) -- the density criterion; and that a sparse point is not a core point (it is a border or noise point). The region queries and cluster expansion are executable; what is proved is the density core-point decision. Requires nnrat/at-most, audit/decide-nnrat-at-most, nnrat/decide-at-most-true-sound (all in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.dbscan` prints this classification.

dbscan/is-core?

DefinitionSource, line 58

dbscan/is-core? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

dbscan/dense-point-is-core

TheoremWorked exampleNo axiomsSource, line 69

dbscan/dense-point-is-core :
  → bo/is-safe 5 3 = data/true

= = equality/Eq

dbscan/core-meets-density

TheoremWorked exampleNo axiomsSource, line 77

dbscan/core-meets-density :
  → 3 ≤ 5

≤ = nnrat/at-most

dbscan/sparse-point-not-core

TheoremWorked exampleNo axiomsSource, line 83

dbscan/sparse-point-not-core :
  → bo/is-safe 2 3 = data/false

= = equality/Eq