liveBook · Manning

Centroid

As explained in Build AI Drug Discovery Pipelines

A centroid is the arithmetic mean position of the points assigned to a cluster.

A centroid is the arithmetic mean position of the points assigned to a cluster. For molecular fingerprints, it represents the cluster center used to find representative compounds.

Selecting compounds near a centroid

Convert each cluster's fingerprints into an array, compute the mean with NumPy, measure Euclidean distances using SciPy, and select the closest molecules. Clusters smaller than the requested sample size are retained in full.

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines the mean position and demonstrates its NumPy computation, stopping short of a broader mathematical treatment.
Examples
Uses fingerprint arrays, NumPy means, SciPy distances, and sampled molecules as concrete implementation artifacts.
What it assumes
Assumes cluster assignments and numerical molecular fingerprints, while demonstrating centroid calculation directly in code.
What you can do after
Apply it via NumPy and SciPy to select molecules closest to each cluster center.
How it connects
Connects cluster centroids with molecular fingerprints, agglomerative clustering, Euclidean distance, and representative compound selection.

Also explained in

Compare how 10 books explain centroid →

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.