NOX73 / go-neural

Neural network implementation on golang
254 stars 40 forks source link

learn.Evaluation() Least Squares Method #10

Open danhardman opened 8 years ago

danhardman commented 8 years ago

I was just checking out the least squares algorithm in the learn.Evaluation() method and I can't find the maths to back up the algorithm used. Would you be able to point me in the right direction?

Why isn't the Means Square Error being used here? Example:

func Evaluation(n *neural.Network, in, ideal []float64) float64 {
    out := n.Calculate(in)

    var e float64
    for i, _ := range out {
        e += math.Pow(out[i]-ideal[i], 2)
    }

    return e / float64(len(out))
}