Skip to content

Commit 3958ae1

Browse files
krishnaw14norvig
authored andcommitted
Correction in the formula for mean square error (aimacode#850)
1 parent 92710c5 commit 3958ae1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

neural_nets.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"\n",
8383
"In both the Perceptron and the Neural Network, we are using the Backpropagation algorithm to train our weights. Basically it achieves that by propagating the errors from our last layer into our first layer, this is why it is called Backpropagation. In order to use Backpropagation, we need a cost function. This function is responsible for indicating how good our neural network is for a given example. One common cost function is the *Mean Squared Error* (MSE). This cost function has the following format:\n",
8484
"\n",
85-
"$$MSE=\\frac{1}{2} \\sum_{i=1}^{n}(y - \\hat{y})^{2}$$\n",
85+
"$$MSE=\\frac{1}{n} \\sum_{i=1}^{n}(y - \\hat{y})^{2}$$\n",
8686
"\n",
8787
"Where `n` is the number of training examples, $\\hat{y}$ is our prediction and $y$ is the correct prediction for the example.\n",
8888
"\n",
@@ -221,14 +221,14 @@
221221
"language_info": {
222222
"codemirror_mode": {
223223
"name": "ipython",
224-
"version": 3
224+
"version": 2
225225
},
226226
"file_extension": ".py",
227227
"mimetype": "text/x-python",
228228
"name": "python",
229229
"nbconvert_exporter": "python",
230-
"pygments_lexer": "ipython3",
231-
"version": "3.5.3"
230+
"pygments_lexer": "ipython2",
231+
"version": "2.7.14"
232232
}
233233
},
234234
"nbformat": 4,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy