diff options
author | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-03-11 11:02:01 -0700 |
---|---|---|
committer | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-03-11 11:02:01 -0700 |
commit | 30d6dabe8818cd8743b982ffdf19f000a4db19aa (patch) | |
tree | 7cb0f48a2e62d72151bdc47f7d3cc6b3c68d779c | |
parent | a0a88b07f5ec90573d9fd6e56d14ea9d2f18c576 (diff) |
Rearrange prints
-rw-r--r-- | ml_exp/krr.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ml_exp/krr.py b/ml_exp/krr.py index cf2669623..2b9d32157 100644 --- a/ml_exp/krr.py +++ b/ml_exp/krr.py @@ -68,7 +68,7 @@ def krr(descriptors, identifier = 'NOT SPECIFIED' if not data_size == labels.shape[0]: - raise ValueError('Energies size is different than descriptors size.') + raise ValueError('Labels size is different than descriptors size.') if training_size >= data_size: raise ValueError('Training size is greater or equal to the data size.') @@ -78,6 +78,7 @@ def krr(descriptors, use_tf = False # If test_size is not set, it is set to a maximum size of 1500. + # Also, no overlapping with training data is achieved. if not test_size: test_size = data_size - training_size if test_size > 1500: @@ -88,6 +89,8 @@ def krr(descriptors, printc(f'\tTraining size: {training_size}', 'CYAN') printc(f'\tTest size: {test_size}', 'CYAN') printc(f'\tSigma: {test_size}', 'CYAN') + printc(f'\tKernel: {laplauss}', 'CYAN') + printc(f'\tUse tf: {use_tf}', 'CYAN') if use_tf: if tf.config.experimental.list_physical_devices('GPU'): @@ -148,12 +151,10 @@ def krr(descriptors, mae = np.mean(np.abs(Y_pr - Y_te)) - if show_msgs: - printc(f'\tMAE for {identifier}: {mae:.4f}', 'GREEN') - toc = time.perf_counter() tictoc = toc - tic if show_msgs: + printc(f'\tMAE for {identifier}: {mae:.4f}', 'GREEN') printc(f'\t{identifier} ML took {tictoc:.4f} seconds.', 'GREEN') return mae, tictoc |