COPKMeansOptions<T>

Options & Configuration · AiDotNet.Clustering.Options

Configuration options for COP-KMeans (Constrained K-Means).

Inheritance: ModelOptions → ClusteringOptions<T> → COPKMeansOptions<T>

For Beginners

Sometimes you have partial knowledge about your data.

You might know:

  • “These two customers bought the same product” (must-link)
  • “These two users are different people” (cannot-link)

COP-KMeans uses this information to guide clustering:

  • It won’t separate must-linked pairs
  • It won’t group cannot-linked pairs

This is “semi-supervised” because you have some labels but not all.

How It Works

COP-KMeans extends K-Means with pairwise constraints:

  • Must-link: Two points must be in the same cluster
  • Cannot-link: Two points must be in different clusters

Constructors

Constructor Summary
COPKMeansOptions() Initializes COPKMeansOptions with appropriate defaults.

Properties

Property Summary
List<ValueTuple<int, int>> CannotLink { get; set; } Gets or sets the cannot-link constraints.
List<ValueTuple<int, int>> MustLink { get; set; } Gets or sets the must-link constraints.
bool UseTransitiveClosure { get; set; } Gets or sets whether to use transitive closure for must-link constraints.
int NumClusters { get; set; } Gets or sets the number of clusters.