HierarchicalOptions<T>
Options & Configuration · AiDotNet.Clustering.Options
Configuration options for Hierarchical (Agglomerative) clustering.
Inheritance: ModelOptions → ClusteringOptions<T> → HierarchicalOptions<T>
For Beginners
Hierarchical clustering creates a family tree of data.
How it works:
- Start with each point as its own cluster
- Find the two closest clusters
- Merge them into one
- Repeat until desired number of clusters
The result is a dendrogram (tree diagram) showing how clusters merge. You can cut the tree at different levels to get different numbers of clusters.
Linkage methods determine “closest”:
- Single: Nearest points in clusters (chain-like clusters)
- Complete: Farthest points in clusters (compact clusters)
- Average: Average of all pairwise distances
- Ward: Minimizes within-cluster variance (most popular)
How It Works
Hierarchical clustering builds a tree (dendrogram) of clusters by successively merging or splitting clusters based on distance. Agglomerative clustering starts with each point as its own cluster and merges them bottom-up.
Constructors
| Constructor | Summary |
|---|---|
HierarchicalOptions() |
Properties
| Property | Summary |
|---|---|
LinkageMethod Linkage { get; set; } |
Gets or sets the linkage criterion for merging clusters. |
Matrix<T> Connectivity { get; set; } |
Gets or sets the connectivity constraint matrix. |
bool ComputeDistances { get; set; } |
Gets or sets whether to compute distances between clusters. |
bool ComputeFullTree { get; set; } |
Gets or sets whether to compute the full dendrogram. |
double? DistanceThreshold { get; set; } |
Gets or sets the distance threshold for cluster formation. |
int NumClusters { get; set; } |
Gets or sets the number of clusters to find. |