Cluster entries using DBSCAN.
Input:
- A pairwise distance TSV file (
name1\tname2\tdistance). Lower distances indicate higher similarity.
Output:
--format cluster(default): each line contains points of one cluster.--format pair: each line contains a(representative, member)pair.
Notes:
- The input must contain distances, not similarities.
--eps <V>: neighborhood radius (default:0.05).--min-points <N>: minimum number of points (including the point itself) to form a dense region (default:4).--min-pct <P>: alternative to--min-points; specify the minimum as a fraction of the total number of samples (range(0, 1]). The effective value isceil(P * n_samples). Mutually exclusive with--min-points.--same <V>: default score of identical element pairs (default:0.0).--missing <V>: default score of missing pairs (default:1.0).- The representative point is selected by
--rep:medoid(default): point with minimum sum of distances to other cluster members.first: alphabetically first member.
- In
clusterformat, the representative is placed first; inpairformat, it is the first column. - Noise points (points not assigned to any density cluster) are emitted as single-member clusters. In
pairformat this appears asName <tab> Name. - The neighborhood count used by
--min-pointsincludes the point itself when--sameis 0.0 (default), because self-distance is then 0 and is always <= eps. Setting--sameto a value greater thanepsexcludes the point from its own neighborhood. - To scan
epsvalues and compare internal metrics, usenecom clust scan-dbscan.
Examples:
-
Run DBSCAN with defaults
necom clust dbscan pairs.tsv -
Set epsilon and min-points (min-points default: 4; here set to 5)
necom clust dbscan pairs.tsv --eps 0.05 --min-points 5 -
Use –min-pct instead of –min-points
necom clust dbscan pairs.tsv --min-pct 0.1 -
Output as pairs
necom clust dbscan pairs.tsv --format pair