Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mean-square error calculation #11

Open
simonfoxguitar opened this issue Jun 15, 2020 · 0 comments
Open

Mean-square error calculation #11

simonfoxguitar opened this issue Jun 15, 2020 · 0 comments

Comments

@simonfoxguitar
Copy link

Hi there,
I think the mean-square error calculation might have a problem. It doesn't seem to be accumulating values. That swift syntax is a little unfamiliar to me, so I tried typing it out verbosely:

var errorSum = Float(0)
                for x in 0 ..< real.count {
                    let error = (real[x] - target[x]) * (real[x] - target[x])
                    errorSum += error
                }
                errorSum /= Float(real.count)

... and the result was different.
Hope this helps your project, apologies if I have got it wrong, best wishes,
Simon.

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

No branches or pull requests

1 participant