liveBook · Manning

Distance

As explained in Build AI Drug Discovery Pipelines

Distance is a numerical measure of separation between two points or objects in a mathematical representation.

Distance measures how far apart two points are in a feature space. Nearby points are more alike in the features represented; farther-apart points are more dissimilar. For example, an apple at (5, 3) and an orange at (3, 4) can be compared using sweetness and size coordinates. In molecule screening, fingerprints represent molecules as points, and distance helps describe how different they are. section 2.5.1

Distance also helps select diverse samples for a dataset split:

  • The Kennard–Stone algorithm calculates pairwise distances, starts with the two farthest-apart samples, then adds samples maximally distant from those already selected until the subset reaches its target size. section 6.2.2
  • Distance calculations can be costly for many samples, and sparse, high-dimensional descriptor spaces pose separate statistical challenges. section 6.2.2
Figure 6.7 KSA ensures representative sampling from each cluster in this arbitrarily created data set, rather than sampling that is biased towards only one or two clusters.

Visualizes Kennard–Stone sampling across clusters in a toy dataset. section 6.2.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines distance through coordinates and explains pairwise calculations and Kennard–Stone selection, while noting high-dimensional challenges.
Examples
Illustrates coordinates with an apple and orange, and sample selection with ligand descriptors and a toy dataset.
What it assumes
Builds from zero with fruit represented by sweetness and size coordinates before relating feature-space distance to similarity.
What you can do after
Apply it via the Kennard–Stone algorithm to select a diverse subset from a dataset.
How it connects
Connects Euclidean distance with feature spaces, molecular fingerprints, similarity searching, and the Kennard–Stone algorithm.

Also explained in

Compare how 12 books explain distance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.