Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroya Chiba committed Sep 11, 2017
1 parent b5f2b17 commit 04f4106
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions 3.7-predicting-house-prices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"\n",
"In our two previous examples, we were considering classification problems, where the goal was to predict a single discrete label of an \n",
"input data point. Another common type of machine learning problem is \"regression\", which consists of predicting a continuous value instead \n",
"instead of a discrete label. For instance, predicting the temperature tomorrow, given meteorological data, or predicting the time that a \n",
"of a discrete label. For instance, predicting the temperature tomorrow, given meteorological data, or predicting the time that a \n",
"software project will take to complete, given its specifications.\n",
"\n",
"Do not mix up \"regression\" with the algorithm \"logistic regression\": confusingly, \"logistic regression\" is not a regression algorithm, \n",
Expand Down Expand Up @@ -282,7 +282,7 @@
"\n",
"def build_model():\n",
" # Because we will need to instantiate\n",
" # the same model multiple time,\n",
" # the same model multiple times,\n",
" # we use a function to construct it.\n",
" model = models.Sequential()\n",
" model.add(layers.Dense(64, activation='relu',\n",
Expand All @@ -304,7 +304,7 @@
"we applied a `sigmoid` activation function to our last layer, the network could only learn to predict values between 0 and 1. Here, because \n",
"the last layer is purely linear, the network is free to learn to predict values in any range.\n",
"\n",
"Note that we are compiling the network with the `mse` loss function -- Mean Squared Error, the square of the different between the \n",
"Note that we are compiling the network with the `mse` loss function -- Mean Squared Error, the square of the difference between the \n",
"predictions and the targets, a widely used loss function for regression problems.\n",
"\n",
"We are also monitoring a new metric during training: `mae`. This stands for Mean Absolute Error. It is simply the absolute value of the \n",
Expand Down Expand Up @@ -431,7 +431,7 @@
"metadata": {},
"source": [
"\n",
"As you can notice, the different runs do indeed show rather different validation scores, from 2.1 to 2.29. Their average (2.4) is a much more \n",
"As you can notice, the different runs do indeed show rather different validation scores, from 2.1 to 2.9. Their average (2.4) is a much more \n",
"reliable metric than any single of these scores -- that's the entire point of K-fold cross-validation. In this case, we are off by \\$2,400 on \n",
"average, which is still significant considering that the prices range from \\$10,000 to \\$50,000. \n",
"\n",
Expand Down Expand Up @@ -600,7 +600,7 @@
"metadata": {},
"source": [
"\n",
"According to this plot, it seems that validation MAE stops improving significantly after after 80 epochs. Past that point, we start overfitting.\n",
"According to this plot, it seems that validation MAE stops improving significantly after 80 epochs. Past that point, we start overfitting.\n",
"\n",
"Once we are done tuning other parameters of our model (besides the number of epochs, we could also adjust the size of the hidden layers), we \n",
"can train a final \"production\" model on all of the training data, with the best parameters, then look at its performance on the test data:"
Expand Down
2 changes: 1 addition & 1 deletion 4.4-overfitting-and-underfitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
"training data and a network architecture, there are multiple sets of weights values (multiple _models_) that could explain the data, and \n",
"simpler models are less likely to overfit than complex ones.\n",
"\n",
"A \"simple model\" in this context is a model where the where the distribution of parameter values has less entropy (or a model with fewer \n",
"A \"simple model\" in this context is a model where the distribution of parameter values has less entropy (or a model with fewer \n",
"parameters altogether, as we saw in the section above). Thus a common way to mitigate overfitting is to put constraints on the complexity \n",
"of a network by forcing its weights to only take small values, which makes the distribution of weight values more \"regular\". This is called \n",
"\"weight regularization\", and it is done by adding to the loss function of the network a _cost_ associated with having large weights. This \n",
Expand Down
2 changes: 1 addition & 1 deletion 5.2-using-convnets-with-small-datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
"source": [
"## Building our network\n",
"\n",
"We've already built a small convnet for MNIST in the previous example, so you should being familiar with them. We will reuse the same \n",
"We've already built a small convnet for MNIST in the previous example, so you should be familiar with them. We will reuse the same \n",
"general structure: our convnet will be a stack of alternated `Conv2D` (with `relu` activation) and `MaxPooling2D` layers.\n",
"\n",
"However, since we are dealing with bigger images and a more complex problem, we will make our network accordingly larger: it will have one \n",
Expand Down
6 changes: 3 additions & 3 deletions 5.4-visualizing-what-convnets-learn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
"source": [
"When fed an image input, this model returns the values of the layer activations in the original model. This is the first time you encounter \n",
"a multi-output model in this book: until now the models you have seen only had exactly one input and one output. In the general case, a \n",
"model could have any number of inputs and outputs. This one has one input and 5 outputs, one output per layer activation."
"model could have any number of inputs and outputs. This one has one input and 8 outputs, one output per layer activation."
]
},
{
Expand Down Expand Up @@ -326,7 +326,7 @@
"metadata": {},
"source": [
"This one looks like a \"bright green dot\" detector, useful to encode cat eyes. At this point, let's go and plot a complete visualization of \n",
"all the activations in the network. We'll extract and plot every channel in each of our 5 activation maps, and we will stack the results in \n",
"all the activations in the network. We'll extract and plot every channel in each of our 8 activation maps, and we will stack the results in \n",
"one big image tensor, with channels stacked side by side."
]
},
Expand Down Expand Up @@ -1123,7 +1123,7 @@
"* Why did the network think this image contained an African elephant?\n",
"* Where is the African elephant located in the picture?\n",
"\n",
"In particular, it is interesting the note that the ears of the elephant cub are strongly activated: this is probably how the network can \n",
"In particular, it is interesting to note that the ears of the elephant cub are strongly activated: this is probably how the network can \n",
"tell the difference between African and Indian elephants.\n"
]
}
Expand Down

0 comments on commit 04f4106

Please sign in to comment.