From 90e3175c7df6e14ef40d617a64cb1038787f54de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Tue, 22 Jan 2019 16:54:47 +0800 Subject: [PATCH] Remove warnings about old 1st edition code changes --- 02_end_to_end_machine_learning_project.ipynb | 7 ------- 04_training_linear_models.ipynb | 7 ------- 08_dimensionality_reduction.ipynb | 16 ---------------- .../extra_tensorflow_reproducibility.ipynb | 2 +- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/02_end_to_end_machine_learning_project.ipynb b/02_end_to_end_machine_learning_project.ipynb index fb13cb9..a9ff862 100644 --- a/02_end_to_end_machine_learning_project.ipynb +++ b/02_end_to_end_machine_learning_project.ipynb @@ -575,13 +575,6 @@ "housing[\"population_per_household\"]=housing[\"population\"]/housing[\"households\"]" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Note: there was a bug in the previous cell, in the definition of the `rooms_per_household` attribute. This explains why the correlation value below differs slightly from the value in the book (unless you are reading the latest version)." - ] - }, { "cell_type": "code", "execution_count": 43, diff --git a/04_training_linear_models.ipynb b/04_training_linear_models.ipynb index 3df86cf..21b0bfe 100644 --- a/04_training_linear_models.ipynb +++ b/04_training_linear_models.ipynb @@ -229,13 +229,6 @@ "np.linalg.pinv(X_b).dot(y)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Note**: the first releases of the book implied that the `LinearRegression` class was based on the Normal Equation. This was an error, my apologies: as explained above, it is based on the pseudoinverse, which ultimately relies on the SVD matrix decomposition of $\\mathbf{X}$ (see chapter 8 for details about the SVD decomposition). Its time complexity is $O(n^2)$ and it works even when $m < n$ or when some features are linear combinations of other features (in these cases, $\\mathbf{X}^T \\mathbf{X}$ is not invertible so the Normal Equation fails), see [issue #184](https://github.com/ageron/handson-ml/issues/184) for more details. However, this does not change the rest of the description of the `LinearRegression` class, in particular, it is based on an analytical solution, it does not scale well with the number of features, it scales linearly with the number of instances, all the data must fit in memory, it does not require feature scaling and the order of the instances in the training set does not matter." - ] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/08_dimensionality_reduction.ipynb b/08_dimensionality_reduction.ipynb index dfc66ae..0a5634a 100644 --- a/08_dimensionality_reduction.ipynb +++ b/08_dimensionality_reduction.ipynb @@ -103,22 +103,6 @@ "## PCA using SVD decomposition" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Note: the `svd()` function returns `U`, `s` and `Vt`, where `Vt` is equal to $\\mathbf{V}^T$, the transpose of the matrix $\\mathbf{V}$. Earlier versions of the book mistakenly said that it returned `V` instead of `Vt`. Also, Equation 8-1 should actually contain $\\mathbf{V}$ instead of $\\mathbf{V}^T$, like this:\n", - "\n", - "$\n", - "\\mathbf{V} =\n", - "\\begin{pmatrix}\n", - " \\mid & \\mid & & \\mid \\\\\n", - " \\mathbf{c_1} & \\mathbf{c_2} & \\cdots & \\mathbf{c_n} \\\\\n", - " \\mid & \\mid & & \\mid\n", - "\\end{pmatrix}\n", - "$" - ] - }, { "cell_type": "code", "execution_count": 4, diff --git a/work_in_progress/extra_tensorflow_reproducibility.ipynb b/work_in_progress/extra_tensorflow_reproducibility.ipynb index 33ca20e..436a334 100644 --- a/work_in_progress/extra_tensorflow_reproducibility.ipynb +++ b/work_in_progress/extra_tensorflow_reproducibility.ipynb @@ -802,7 +802,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "I hope you enjoyed this notebook. If you do not get reproducible results, or if they are different than mine, then please [file an issue](https://github.com/ageron/handson-ml/issues) on github, specifying what version of Python, TensorFlow, and NumPy you are using, as well as your O.S. version. Thank you!" + "I hope you enjoyed this notebook. If you do not get reproducible results, or if they are different than mine, then please [file an issue](https://github.com/ageron/handson-ml2/issues) on github, specifying what version of Python, TensorFlow, and NumPy you are using, as well as your O.S. version. Thank you!" ] }, {