def evaluation(self, X_test, y_test):
    X_test = self.normalization(X_test)
    pred_y_test = np.zeros([self.M, len(y_test)])
    prob = np.zeros([self.M, len(y_test)])
    '\n            Since we have M particles, we use a Bayesian view to calculate rmse and log-likelihood\n        '
    for i in range(self.M):
        (w1, b1, w2, b2, loggamma, loglambda) = self.unpack_weights(self.thetaCopy[i, :])
        pred_y_test[i, :] = ((self.nn_predict(X_test, w1, b1, w2, b2) * self.std_y_train) + self.mean_y_train)
        prob[i, :] = ((np.sqrt(np.exp(loggamma)) / np.sqrt((2 * np.pi))) * np.exp((((- 1) * (np.power((pred_y_test[i, :] - y_test), 2) / 2)) * np.exp(loggamma))))
    pred = np.mean(pred_y_test, axis=0)
    svgd_rmse = np.sqrt(np.mean(((pred - y_test) ** 2)))
    svgd_ll = np.mean(np.log(np.mean(prob, axis=0)))
    return (svgd_rmse, svgd_ll)
def evaluation(self, X_test, y_test):
    X_test = self.normalization(X_test)
    pred_y_test = np.zeros([self.M, len(y_test)])
    prob = np.zeros([self.M, len(y_test)])
    '\n            Since we have M particles, we use a Bayesian view to calculate rmse and log-likelihood\n        '
    for i in range(self.M):
        (w1, b1, w2, b2, loggamma, loglambda) = self.unpack_weights(self.thetaCopy[i, :])
        pred_y_test[i, :] = ((self.nn_predict(X_test, w1, b1, w2, b2) * self.std_y_train) + self.mean_y_train)
        prob[i, :] = ((np.sqrt(np.exp(loggamma)) / np.sqrt((2 * np.pi))) * np.exp((((- 1) * (np.power((pred_y_test[i, :] - y_test), 2) / 2)) * np.exp(loggamma))))
    pred = np.mean(pred_y_test, axis=0)
    svgd_rmse = np.sqrt(np.mean(((pred - y_test) ** 2)))
    svgd_ll = np.mean(np.log(np.mean(prob, axis=0)))
    return (svgd_rmse, svgd_ll)