Module balltree

Module balltree 

Source
Expand description

Ball Tree implementation for efficient nearest neighbor search

A Ball Tree is a space-partitioning data structure for organizing points in a k-dimensional space. It divides points into nested hyperspheres, which makes it particularly effective for high-dimensional data.

Advantages of Ball Trees over KD-Trees:

  • Better performance in high dimensions
  • More efficient for datasets with varying density
  • Handles elongated clusters well

This implementation provides:

  • Building balanced Ball Trees from point data
  • Efficient exact nearest neighbor queries
  • k-nearest neighbor searches
  • Range queries for all points within a specified radius

Structsยง

BallTree
Ball Tree for efficient nearest neighbor searches in high dimensions