fuzzyclust.cluster.geometric_compatibility#

fuzzyclust.cluster.geometric_compatibility(V, F, parallel_threshold=0.95, hyperplane_threshold=0.5, distance_threshold=2.0, thin_threshold=0.2)[source]#

Compatibility of cluster pairs from centers and covariances (Krishnapuram & Freg).

Let \(\boldsymbol\phi_i\) be the eigenvector of the smallest eigenvalue of \(\mathbf{F}_i\) (the normal of a thin cluster), \(\lambda_{i,\max}\) its largest eigenvalue and \(\sigma_i=\sqrt{\lambda_{i,\max}}\) the extent of the cluster along its main axis. Clusters \(i\) and \(j\) are compatible if

  1. their normals are parallel, \(|\boldsymbol\phi_i\T\boldsymbol\phi_j|\ge\gamma_1\);

  2. their centers lie on the same hyperplane, \(|\tfrac12(\boldsymbol\phi_i+\boldsymbol\phi_j)\T(\mathbf{v}_i-\mathbf{v}_j)| \le\gamma_2\,\tfrac12(\sigma_i+\sigma_j)\);

  3. their centers are close, \(\|\mathbf{v}_i-\mathbf{v}_j\|\le\gamma_3(\sigma_i+\sigma_j)\);

and both are thin, \(\lambda_{\min}/\lambda_{\max}\le\gamma_4\). The compatibility degree returned for a compatible pair is the normal alignment \(|\boldsymbol\phi_i\T\boldsymbol\phi_j|\) reduced by the relative hyperplane offset and center distance, so that the most compatible pair can be chosen; incompatible pairs get zero.

Parameters:
Vndarray of shape (n_clusters, n_features)
Fndarray of shape (n_clusters, n_features, n_features)
parallel_threshold, hyperplane_threshold, distance_threshold, thin_thresholdfloat

\(\gamma_1,\dots,\gamma_4\).

Returns:
Cndarray of shape (n_clusters, n_clusters)

Compatibility degrees (zero for incompatible pairs and on the diagonal).