diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2020-07-21 16:32:05 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2020-07-21 16:32:05 +0200 |
commit | 663122dabf0498ae9522b0f53939e21ab64d052b (patch) | |
tree | 254b1d6964c710c7be3624040452c2ed5b902efc /demo.py | |
parent | c5c6b4f2f2640319a51924349055678e2b924514 (diff) |
Implement a proper progress bar and better messages.
Diffstat (limited to 'demo.py')
-rw-r--r-- | demo.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ import os import matplotlib.pyplot as plt + from colour import ( SpectralShape, COLOURCHECKER_SDS, ILLUMINANT_SDS, sd_to_XYZ) @@ -8,7 +9,7 @@ from otsu2018 import load_Otsu2018_spectra, Clustering if __name__ == '__main__': print('Loading spectral data...') - sds = load_Otsu2018_spectra('CommonData/spectrum_m.csv', every_nth=50) + sds = load_Otsu2018_spectra('CommonData/spectrum_m.csv', every_nth=1) shape = SpectralShape(380, 730, 10) print('Initializing the clustering...') @@ -16,7 +17,7 @@ if __name__ == '__main__': print('Clustering...') before = clustering.root.total_reconstruction_error() - clustering.optimise(2) + clustering.optimise(8) after = clustering.root.total_reconstruction_error() print('Error before: %g' % before) |