def testRelativeImageSegmentation(self): image = ndimage.imread('..//..//images//113044.jpg') # Successive executions of the clustering algorithm no_of_clusters_list, values_of_q, PC, PE, XB, FS = relative_criteria.relative_validity_fuzzy( image) # Plot the indices plot_relative_criteria_fuzzy(no_of_clusters_list, values_of_q, PC, PE, XB, FS) plt.show()
def testRelativeBlobs(self): no_of_clusters= 5 # Create the dataset X, y = make_blobs(n_samples=100, centers= no_of_clusters, n_features=2,random_state=20) # Successive executions of the clustering algorithm no_of_clusters_list, values_of_q, PC, PE, XB, FS = relative_criteria.relative_validity_fuzzy(X, no_of_clusters) # Plot the indices plot_relative_criteria_fuzzy(no_of_clusters_list, values_of_q, PC, PE, XB, FS) plt.show()
def testRelativeMoons(self): no_of_clusters= 2 # Create the dataset X, y = make_moons(n_samples=100, shuffle = True, noise = 0.1, random_state = 10) # Successive executions of the clustering algorithm no_of_clusters_list, values_of_q, PC, PE, XB, FS = relative_criteria.relative_validity_fuzzy(X, no_of_clusters) # Plot the indices plot_relative_criteria_fuzzy(no_of_clusters_list, values_of_q, PC, PE, XB, FS) plt.show()