Commit 745f2a4da4d93d84b41f8de5008899f3ef816b3d
1 parent
11fc8731
Exists in
master
and in
1 other branch
Added cluster dispersion to logging message.
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/examples/clustering.py
... | ... | @@ -36,12 +36,14 @@ if __name__ == '__main__': |
36 | 36 | begin_time = datetime.datetime.now() |
37 | 37 | logging.info("Clustering computation started at %s" % begin_time) |
38 | 38 | |
39 | - cl = PopconXapianIndex(cfg) | |
39 | + pxi = PopconXapianIndex(cfg) | |
40 | 40 | |
41 | 41 | end_time = datetime.datetime.now() |
42 | 42 | logging.info("Clustering computation completed at %s" % end_time) |
43 | 43 | delta = end_time - begin_time |
44 | 44 | logging.info("Time elapsed: %d seconds." % delta.seconds) |
45 | + logging.info("Medoids: %d\tDispersion:%f" % | |
46 | + (cfg.k_medoids,pxi.cluster_dispersion)) | |
45 | 47 | |
46 | 48 | except Error: |
47 | 49 | logging.critical("Aborting proccess. Use '--debug' for more details.") | ... | ... |