diff options
author | David Luevano <55825613+luevano@users.noreply.github.com> | 2019-12-23 11:48:32 -0700 |
---|---|---|
committer | David Luevano <55825613+luevano@users.noreply.github.com> | 2019-12-23 11:48:32 -0700 |
commit | 72be4105825c639cf9dfad6229c7a1d62a16c44d (patch) | |
tree | ae0ca8996a8bd269a814d834da240b04d73dafb2 /lj_matrix | |
parent | b7b0d39af578159a0c53eacc9c55cc79084c7469 (diff) |
Change name convention
Diffstat (limited to 'lj_matrix')
-rw-r--r-- | lj_matrix/do_ml.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lj_matrix/do_ml.py b/lj_matrix/do_ml.py index ba88a6fd8..bb954a0ae 100644 --- a/lj_matrix/do_ml.py +++ b/lj_matrix/do_ml.py @@ -79,17 +79,17 @@ def do_ml(desc_data, printc('\tTest size: {}'.format(test_size), 'CYAN') printc('\tSigma: {}'.format(sigma), 'CYAN') - Xcm_training = desc_data[:training_size] - Ycm_training = energy_data[:training_size] - Kcm_training = gauss_kernel(Xcm_training, Xcm_training, sigma) - alpha_cm = cholesky_solve(Kcm_training, Ycm_training) + X_training = desc_data[:training_size] + Y_training = energy_data[:training_size] + K_training = gauss_kernel(X_training, X_training, sigma) + alpha_ = cholesky_solve(K_training, Y_training) - Xcm_test = desc_data[-test_size:] - Ycm_test = energy_data[-test_size:] - Kcm_test = gauss_kernel(Xcm_test, Xcm_training, sigma) - Ycm_predicted = np.dot(Kcm_test, alpha_cm) + X_test = desc_data[-test_size:] + Y_test = energy_data[-test_size:] + K_test = gauss_kernel(X_test, X_training, sigma) + Y_predicted = np.dot(K_test, alpha_) - mae = np.mean(np.abs(Ycm_predicted - Ycm_test)) + mae = np.mean(np.abs(Y_predicted - Y_test)) if show_msgs: printc('\tMAE for {}: {:.4f}'.format(desc_type, mae), 'GREEN') |