Skip to main content
. Author manuscript; available in PMC: 2018 May 1.
Published in final edited form as: IEEE Trans Neural Netw Learn Syst. 2016 Feb 18;28(5):1123–1138. doi: 10.1109/TNNLS.2015.2511179

Algorithm 2.

Type-I/Type-II Affinity and Penalty Jointly Constrained Spectral Clustering

Step 1: Convert the known supervision into MLS and CLS;
Step 2: Calculate the affinity matrix W of the given data set X, manipulate W according to (5), generate the Laplacian matrix L, the degree Matrix D, and calculate vol(G);
Step 3: Construct the constraint matrix Pi (i = 1 or 2) based on Theorem 1 or Theorem 2, respectively;
Step 4: Generate and i (i = 1 or 2) according to Theorem 3, and attain Si = η + (1 - η)i, i = 1 or 2;
Step 5: Obtain the first K smallest eigenvectors of Si (i = 1 or 2) using eigenvalue decomposition and construct the continuous solution matrix UN×K;
Step 6: Based on UN×K, yield the normalized UN×K with the norm of each row being 1, and generate the final discrete solution of (13) via K-means [18] or spectral rotation [6], [10] on UN×K.