# Why is the Error surface for a 2 input neural network with 2 weights a parabolic bowl

I am new to machine learning and AI in general and had a quick question regarding the error function surface regarding a simple neural net: 2 input neural net

After reading the following wiki: https://en.wikipedia.org/wiki/Backpropagation

I understand that the error function for a specific input and output of this neural net could be described as:

$$E = (t-y)^2$$ where $t$ is the expected value and $y$ is the value of the output node in the neural net.

However, $y$ is a function of $w_1$, and $w_2$:

$$y=x_1w_1 + x_2w_2$$

This I believe must mean that the final error function should be:

$$E = (t - x_1w_1 - x_2w_2)^2$$

If I graph this function for specific values of $t, x_1$ and $x_2$, I am getting a surface that is a parabolic cylinder instead of a parabolic bowl. Is there anything that I might be looking at wrong? Thanks so much.

• Please, use MathJax (i.e. LaTeX commands) for mathematical notations. – Taroccoesbrocco Jul 11 '18 at 8:01
• The loss function is chosen to be quadratic in the output variable $y$. That is a convention that is also used in other machine learning situations, notably in linear regression. That does not mean that it is quadratic in all the parameters as you correctly observed. It is certainly not a quadratic function of the weights leading into the hidden layer. – Hans Engler Jul 11 '18 at 14:33
• This makes sense, however, is it not wrong to say that there is a discrepancy between the error function defined over $w_1$ and $w_2$ and the 3D plot shown in the wiki? – user2214288 Jul 11 '18 at 16:41
• @user2214288 Yeah... if you look here, which shows how they generate the graph, they are plotting $z=x^2+y^2$, not $(x+y)^2$, I guess the description is off (?) – user3658307 Jul 14 '18 at 0:42