def kmeans(self, x, df): for nc in att.NUMBER_CLUSTERS: for mi in att.MAX_ITERATIONS: for nr in att.NUMBER_INIT: configuration, alg = clustering.kmeans(nc, nr, mi) if results.path_exists(configuration) is False: self.execute_clustering(alg, configuration, df, x)
def affinity_propagation(self, x, df): for mi in att.MAX_ITERATIONS: for nr in att.NUMBER_INIT: configuration, alg = clustering.affinity_propagation( nr, mi, att.DAMPING) if results.path_exists(configuration) is False: self.execute_clustering(alg, configuration, df, x)
def dbscan(self, x, df): for metric in att.METRIC: for eps in att.EPS: for min_samples in att.MIN_SAMPLES: configuration, alg = clustering.dbscan( metric, eps, min_samples) if results.path_exists(configuration) is False: self.execute_clustering(alg, configuration, df, x)
def spectral(self, x, df): for affinity in att.AFFINITY_SPECTRAL: for labels in att.ASSIGN_LABELS: for n_neighbors in att.NUMBER_NEIGHBORS: for number_init in att.NUMBER_INIT: configuration, alg = clustering.spectral_clustering( affinity, labels, number_init, n_neighbors) if results.path_exists(configuration) is False: self.execute_clustering(alg, configuration, df, x)
def agglomerative(self, x, df): for nc in att.NUMBER_CLUSTERS: for affinity in att.METRIC: for linkage in att.LINKAGE: if linkage != "ward" and affinity != "euclidean": configuration, alg = clustering.agglomerative( nc, affinity, linkage) if results.path_exists(configuration) is False: self.execute_clustering(alg, configuration, df, x)