summaryrefslogtreecommitdiff
path: root/demo.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-07-22 16:27:50 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-07-22 16:27:50 +0200
commitdb0040dbe91729b9bd78c40b4be75068b1e6968a (patch)
tree0a7545088209f124d9767a389cbe7f7306b66d15 /demo.py
parent663122dabf0498ae9522b0f53939e21ab64d052b (diff)
Vastly improve the quality of clusterings.
Setting a minimum cluster size prevents the algorithm from trying to 'cheat' by creating many 3- or 4-colour clusters. This was especially bad when PCA would determine only two basis functions were necessary (the third one being essentially random), causing massive reconstruction errors.
Diffstat (limited to 'demo.py')
-rw-r--r--demo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/demo.py b/demo.py
index 10e6251..dbaa77d 100644
--- a/demo.py
+++ b/demo.py
@@ -17,7 +17,7 @@ if __name__ == '__main__':
print('Clustering...')
before = clustering.root.total_reconstruction_error()
- clustering.optimise(8)
+ clustering.optimise()
after = clustering.root.total_reconstruction_error()
print('Error before: %g' % before)