Input : datasets , parameter P ; Output : clustering result; (1) RhoSet = Ø , DeltaSet = Ø , and GammaSet = Ø ; //Part 1: Metric extraction (2) distanceMatrix = DistanceFunction (S ); //Calculate distance according to equation (1 ); (3) Calculate the cutoff distance dc according to equation (3 ); (4) RhoSet = Fρ (distanceMatrix, dc ); //Calculate ρ (5) DeltaSet = Fδ (distanceMatrix, Rhoset); //Calculate δ (6) GammaSet = Rhoset·DeltaSet; // //Part 2: clustering center identification (7) = sort (GammaSet, “descend”); //Sort GammaSet in descending order to get a set of ordered statistics γ, indicates the subscript of GammaSet in descending order(8) Calculate DmTi according to equation (6 ); (9) Calculate the discrimination distance according to equation (8 ); (10) while i > 1 do (11) If ( ) { (12) M = i ; } (13) Else { (14) Break ; } (15) end (16) Identify the objects corresponding to {X T 1 , X T 2 ,...., X T(i) } as the clustering centers {C 1 , C 2 ,..., C M }, and label Ci as i ; //Part 3: Object clustering (17) for i = 1 to N do (18) if X i is unlabeled then(19) Mark Xi the with label of its nearest neighbor with higher ρ ; (20) end (21) end (23) return;