Révision d0939bb2 modules/clustering.py
b/modules/clustering.py | ||
---|---|---|
208 | 208 |
logger.info("Clustering using affinity matrix") |
209 | 209 |
labels = get_labels_affty(data) |
210 | 210 |
if max(labels) == -1: |
211 |
logger.error('Clustering of conformers did not converge. Try ' |
|
212 |
"setting a smaller 'min_samples' parameter") |
|
213 |
clusters = get_clusters(labels) |
|
214 |
exemplars = get_exemplars_affty(data, clusters) |
|
211 |
logger.warning('Clustering of conformers did not converge. Try ' |
|
212 |
"setting a smaller 'min_samples' parameter") |
|
213 |
exemplars = list(range(data.shape[0])) |
|
214 |
else: |
|
215 |
clusters = get_clusters(labels) |
|
216 |
exemplars = get_exemplars_affty(data, clusters) |
|
215 | 217 |
if plot: |
216 | 218 |
plot_clusters(labels, x, y, exemplars, save=True) |
217 | 219 |
logger.info(f'Conformers are grouped in {len(exemplars)} clusters.') |
Formats disponibles : Unified diff