Skip to content

Conversation

@evenmn
Copy link

@evenmn evenmn commented May 8, 2025

This PR fixes a bug in the RMSE metric implementation.

Previously, the RMSE function was computing the square of the mean difference between two arrays X and T, rather than the mean of the squared differences. This resulted in incorrect values being returned.

Buggy implementation:

def rmse(X, T):
    return np.sqrt(np.mean(X - T) ** 2)

Corrected implementation:

def rmse(X, T):
    return np.sqrt(np.mean((X - T) ** 2))

This change ensures that the RMSE is calculated according to its standard definition.

Signed-off-by: evenmn <evenmn@mn.uio.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant