#NEWLINE# def test_naive_case_2( self ) : #NEWLINE# #INDENT# points = [ ( 0 , 0 ) , ( 0 , ( - 1 ) ) , ( 6 , 1 ) , ( 6 , 0 ) , ( 1 , 0 ) ] #NEWLINE# matrix = CondensedMatrix ( pdist ( points ) ) #NEWLINE# s_algo = SpectralClusteringAlgorithm ( matrix , max_clusters = 2 , sigma_sq = 0.5 , use_k_medoids = False , verbose = True ) #NEWLINE# clusters = s_algo . perform_clustering ( { #NEWLINE# #INDENT# 'k' : 2 , #NEWLINE# #UNINDENT# } ) . clusters #NEWLINE# for c in clusters : #NEWLINE# #INDENT# self . assertIn ( c . all_elements , [ [ 0 , 1 , 4 ] , [ 2 , 3 ] ] )