Why the SSE error function on the Neuralnet package, divides by 2?

Any idea about why, on the neuralnet package, the sse function for parameter: err.fct divides by 2 the Sum of Squared Errors?

From the document:

we have the following text:

image

we can ignore the Sum of H (outputs) and assume we only have just one output (H = 1). L corresponds to the observations.

In multiple bibliographies on internet they don't divide by 2.

Just in case, here is the neuralnet package reference:

Thanks!

I cannot say whether there are some specific reasons for neuralnet package, but usually this is done convenience.

When you'll be taking the derivative, you'll get a 2 from the square term, and if you used the function with 2 in the denominator, it gets adjusted with it.

Here's a related thread:

1 Like

thank you @Yarnabrina, that helped!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.