From 4a3f602aab73bb0304a237ddca5d9f3fa8867001 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Sat, 29 Feb 2020 14:07:24 -0700 Subject: Fix bugs --- ml_exp/do_ml.py | 4 ++-- ml_exp/representations.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ml_exp') diff --git a/ml_exp/do_ml.py b/ml_exp/do_ml.py index 04f8abe87..5054b2b06 100644 --- a/ml_exp/do_ml.py +++ b/ml_exp/do_ml.py @@ -225,7 +225,7 @@ def do_ml(db_path='data', test_size=test_size, sigma=sigma, opt=opt, - identifier='CM', + identifier='AM', show_msgs=show_msgs) if 'BOB' in identifiers: bob_mae, bob_tictoc = simple_ml(bob_data, @@ -234,7 +234,7 @@ def do_ml(db_path='data', test_size=test_size, sigma=sigma, opt=opt, - identifier='CM', + identifier='BOB', show_msgs=show_msgs) # End of program diff --git a/ml_exp/representations.py b/ml_exp/representations.py index 31259c79c..6b5d26bcb 100644 --- a/ml_exp/representations.py +++ b/ml_exp/representations.py @@ -358,10 +358,12 @@ generated as the vector of eigenvalues, try (re-)generating the CM.') for j, num in enumerate(sorted(bags[checker[1]][1:])[::-1]): # Use c_i as the index for bob if the zero padding should # be at the end of the vector instead of between each bond. - bob[i*size + j] = num + # bob[i*size + j] = num + bob[c_i] = num c_i += 1 else: print(f'Error. Bond {bond} from bond list coudn\'t be found', 'in the bags list. This could be a case where the atom', 'is only present oncce in the molecule.') + return bob -- cgit v1.2.3-54-g00ecf