diff --git a/01_the_machine_learning_landscape.ipynb b/01_the_machine_learning_landscape.ipynb index 417047b61..a75610d07 100644 --- a/01_the_machine_learning_landscape.ipynb +++ b/01_the_machine_learning_landscape.ipynb @@ -6,7 +6,20 @@ "source": [ "**Chapter 1 – The Machine Learning landscape**\n", "\n", - "_This is the code used to generate some of the figures in chapter 1._" + "_This is the code used to generate some of the figures in chapter 1._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -54,17 +67,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"fundamentals\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)\n", - "\n", - "# Ignore useless warnings (see SciPy issue #5998)\n", - "import warnings\n", - "warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2982,7 +2993,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/02_end_to_end_machine_learning_project.ipynb b/02_end_to_end_machine_learning_project.ipynb index d0c28335b..922ca46fa 100644 --- a/02_end_to_end_machine_learning_project.ipynb +++ b/02_end_to_end_machine_learning_project.ipynb @@ -8,7 +8,20 @@ "\n", "*Welcome to Machine Learning Housing Corp.! Your task is to predict median house values in Californian districts, given a number of features from these districts.*\n", "\n", - "*This notebook contains all the sample code and solutions to the exercices in chapter 2.*" + "*This notebook contains all the sample code and solutions to the exercices in chapter 2.*\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -60,17 +73,14 @@ "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"end_to_end_project\"\n", "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format=fig_extension, dpi=resolution)\n", - "\n", - "# Ignore useless warnings (see SciPy issue #5998)\n", - "import warnings\n", - "warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -5879,7 +5889,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.10" }, "nav_menu": { "height": "279px", diff --git a/03_classification.ipynb b/03_classification.ipynb index 9d1a2f509..8ad7243d3 100644 --- a/03_classification.ipynb +++ b/03_classification.ipynb @@ -6,7 +6,20 @@ "source": [ "**Chapter 3 – Classification**\n", "\n", - "_This notebook contains all the sample code and solutions to the exercises in chapter 3._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 3._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -50,13 +63,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"classification\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -4462,7 +4477,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/04_training_linear_models.ipynb b/04_training_linear_models.ipynb index a8b3a757a..29fd73711 100644 --- a/04_training_linear_models.ipynb +++ b/04_training_linear_models.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 4._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 4._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -55,17 +68,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"training_linear_models\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)\n", - "\n", - "# Ignore useless warnings (see SciPy issue #5998)\n", - "import warnings\n", - "warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2684,7 +2695,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/05_support_vector_machines.ipynb b/05_support_vector_machines.ipynb index a1c968557..ab295fe4d 100644 --- a/05_support_vector_machines.ipynb +++ b/05_support_vector_machines.ipynb @@ -6,7 +6,20 @@ "source": [ "**Chapter 5 – Support Vector Machines**\n", "\n", - "_This notebook contains all the sample code and solutions to the exercises in chapter 5._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 5._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -50,13 +63,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"svm\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2920,7 +2935,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/06_decision_trees.ipynb b/06_decision_trees.ipynb index 71d13fd8d..4a342772b 100644 --- a/06_decision_trees.ipynb +++ b/06_decision_trees.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 6._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 6._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -55,15 +68,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"decision_trees\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def image_path(fig_id):\n", - " return os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id)\n", - "\n", - "def save_fig(fig_id, tight_layout=True):\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(image_path(fig_id) + \".png\", format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -114,6 +127,9 @@ "source": [ "from sklearn.tree import export_graphviz\n", "\n", + "def image_path(fig_id):\n", + " return os.path.join(IMAGES_PATH, fig_id)\n", + "\n", "export_graphviz(\n", " tree_clf,\n", " out_file=image_path(\"iris_tree.dot\"),\n", @@ -1009,7 +1025,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": { "height": "309px", diff --git a/07_ensemble_learning_and_random_forests.ipynb b/07_ensemble_learning_and_random_forests.ipynb index f226bc8e6..121b0772c 100644 --- a/07_ensemble_learning_and_random_forests.ipynb +++ b/07_ensemble_learning_and_random_forests.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 7._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 7._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -55,15 +68,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"ensembles\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def image_path(fig_id):\n", - " return os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id)\n", - "\n", - "def save_fig(fig_id, tight_layout=True):\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(image_path(fig_id) + \".png\", format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2560,7 +2573,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": { "height": "252px", diff --git a/08_dimensionality_reduction.ipynb b/08_dimensionality_reduction.ipynb index 0714afbdc..003d2ef0a 100644 --- a/08_dimensionality_reduction.ipynb +++ b/08_dimensionality_reduction.ipynb @@ -6,7 +6,20 @@ "source": [ "**Chapter 8 – Dimensionality Reduction**\n", "\n", - "_This notebook contains all the sample code and solutions to the exercises in chapter 8._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 8._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -50,17 +63,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"unsupervised_learning\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)\n", - "\n", - "# Ignore useless warnings (see SciPy issue #5998)\n", - "import warnings\n", - "warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -7957,7 +7968,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/09_up_and_running_with_tensorflow.ipynb b/09_up_and_running_with_tensorflow.ipynb index c1bddfaa1..f57dacce2 100644 --- a/09_up_and_running_with_tensorflow.ipynb +++ b/09_up_and_running_with_tensorflow.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 9._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 9._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -41,6 +54,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -58,13 +77,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"tensorflow\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -3352,7 +3373,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.7.10" }, "nav_menu": { "height": "603px", diff --git a/10_introduction_to_artificial_neural_networks.ipynb b/10_introduction_to_artificial_neural_networks.ipynb index e66fdebc5..eec0bce25 100644 --- a/10_introduction_to_artificial_neural_networks.ipynb +++ b/10_introduction_to_artificial_neural_networks.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 10._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 10._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -41,6 +54,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -58,13 +77,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"ann\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -1375,7 +1396,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": { "height": "264px", diff --git a/11_deep_learning.ipynb b/11_deep_learning.ipynb index 00a05833b..2d32a1a20 100644 --- a/11_deep_learning.ipynb +++ b/11_deep_learning.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 11._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 11._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -41,6 +54,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -58,13 +77,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"deep\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -6712,7 +6733,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.10" }, "nav_menu": { "height": "360px", diff --git a/12_distributed_tensorflow.ipynb b/12_distributed_tensorflow.ipynb index 11073ac64..2e5665e1d 100644 --- a/12_distributed_tensorflow.ipynb +++ b/12_distributed_tensorflow.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 12._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 12._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -41,6 +54,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -58,13 +77,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"distributed\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -862,7 +883,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.5" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/13_convolutional_neural_networks.ipynb b/13_convolutional_neural_networks.ipynb index d818ed3c5..78441696f 100644 --- a/13_convolutional_neural_networks.ipynb +++ b/13_convolutional_neural_networks.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 13._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 13._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -42,6 +55,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -59,13 +78,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"cnn\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2613,7 +2634,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.0" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/14_recurrent_neural_networks.ipynb b/14_recurrent_neural_networks.ipynb index b34443c67..584e2862c 100644 --- a/14_recurrent_neural_networks.ipynb +++ b/14_recurrent_neural_networks.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 14._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 14._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -41,6 +54,12 @@ "import numpy as np\n", "import os\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -58,13 +77,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"rnn\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -3463,7 +3484,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/15_autoencoders.ipynb b/15_autoencoders.ipynb index 549fb81cb..66b4f46a5 100644 --- a/15_autoencoders.ipynb +++ b/15_autoencoders.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains all the sample code and solutions to the exercises in chapter 15._" + "_This notebook contains all the sample code and solutions to the exercises in chapter 15._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -42,6 +55,12 @@ "import os\n", "import sys\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -59,13 +78,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"autoencoders\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2331,7 +2352,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.7.10" }, "nav_menu": { "height": "381px", diff --git a/16_reinforcement_learning.ipynb b/16_reinforcement_learning.ipynb index 2105f73bc..c13998573 100644 --- a/16_reinforcement_learning.ipynb +++ b/16_reinforcement_learning.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook contains all the sample code and solutions to the exersices in chapter 16." + "This notebook contains all the sample code and solutions to the exersices in chapter 16.\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -42,6 +55,12 @@ "import os\n", "import sys\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "# to make this notebook's output stable across runs\n", "def reset_graph(seed=42):\n", " tf.reset_default_graph()\n", @@ -60,13 +79,15 @@ "# Where to save the figures\n", "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"rl\"\n", + "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", + "os.makedirs(IMAGES_PATH, exist_ok=True)\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format='png', dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -15361,62 +15382,62 @@ }, { "cell_type": "code", + "execution_count": 93, "metadata": { - "id": "gq8yjOdZx9yS", + "colab": {}, "colab_type": "code", - "colab": {} + "id": "gq8yjOdZx9yS" }, + "outputs": [], "source": [ "import gym\n", "\n", "env = gym.make('Pong-v0')\n", "obs = env.reset()" - ], - "execution_count": 93, - "outputs": [] + ] }, { "cell_type": "code", - "metadata": {}, - "source": [ - "obs.shape" - ], "execution_count": 94, + "metadata": {}, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "(210, 160, 3)" ] }, + "execution_count": 94, "metadata": { "tags": [] }, - "execution_count": 94 + "output_type": "execute_result" } + ], + "source": [ + "obs.shape" ] }, { "cell_type": "code", - "metadata": {}, - "source": [ - "env.action_space" - ], "execution_count": 95, + "metadata": {}, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "Discrete(6)" ] }, + "execution_count": 95, "metadata": { "tags": [] }, - "execution_count": 95 + "output_type": "execute_result" } + ], + "source": [ + "env.action_space" ] }, { @@ -15430,7 +15451,9 @@ }, { "cell_type": "code", + "execution_count": 96, "metadata": {}, + "outputs": [], "source": [ "# A helper function to run an episode of Pong. It's first argument should be a\n", "# function which takes the observation of the environment and the current\n", @@ -15445,20 +15468,14 @@ " if done:\n", " break\n", " return plot_animation(frames)" - ], - "execution_count": 96, - "outputs": [] + ] }, { "cell_type": "code", - "metadata": {}, - "source": [ - "run_episode(lambda obs, i: np.random.randint(0, 5))" - ], "execution_count": 97, + "metadata": {}, "outputs": [ { - "output_type": "display_data", "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAANMAAAEACAYAAAAp2kPsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAA8BJREFUeJzt3T1uE1EYQFEGZQMwW6FJ+kggFoPE\nQhAsBlGkTxq2MmxhKCIhEYwtx9f2xHNOF/lHr7n65jlv7GGe51fA4V6fewFwKcQEETFBREwQERNE\nxAQRMUFETBARE0TEBJGrcy9gk2EYtp5x+vr+zamWAn98+vFr2Pb4ImM6Riy3N9d7Pf/u/uGg1296\nDx79/Pxx79e8+/L9CCtpucyDiJggIiaILHLPdAy79i+H7qme8x482rQfes6+6txMJoiICSJigshq\n9kz2MxybyQQRMUFETBBZzZ7pKefmqJlMEBETRMQEETFBZLUfQOz6J259MJb/e4mHWjcxmSAiJoiI\nCSLDEn/s7NuHt8tbFKu369uJTCaIiAkii7zMm6ZpeYti9cZxdJkHpyAmiIgJImKCiJggIiaIiAki\nYoKImCCyyBMQDrpyqKc3HBa/POigK5yImCAiJoiICSJigoiYILLa783jshUfhe/LZIKImCAiJoiI\nCSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAki\nYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKC\niJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiY\nICImiIgJImKCiJggIiaIiAkiYoKImCByde4FHMvtzfVff9/dP5xpJayFyQQRMUFETBARE0TEBBEx\nQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0Qu9uZANwNyaiYTRMQEETFBREwQERNExAQRMUFE\nTBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQ\nERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBET\nRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExASRYZ7nc6/hH9M0\nLW9RrN44jsO2x00miIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggssib\nA+ElMpkgIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJi\ngoiYICImiIgJImKCiJggIiaI/AbgAEzkApWdfAAAAABJRU5ErkJggg==\n", "text/plain": [ @@ -15467,8 +15484,12 @@ }, "metadata": { "tags": [] - } + }, + "output_type": "display_data" } + ], + "source": [ + "run_episode(lambda obs, i: np.random.randint(0, 5))" ] }, { @@ -15486,7 +15507,9 @@ }, { "cell_type": "code", + "execution_count": 98, "metadata": {}, + "outputs": [], "source": [ "green_paddle_color = (92, 186, 92)\n", "red_paddle_color = (213, 130, 74)\n", @@ -15503,13 +15526,26 @@ " else:\n", " tmp[i] = 0.0\n", " return tmp.reshape(80, 80)" - ], - "execution_count": 98, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 99, "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAApIAAAGgCAYAAAAZ0oddAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xe4ZVV5P/Dvq1hQmjIaARV/G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AMESQBABgiCAJAMAQQRIAgCGCJAAAQwRJAACGCJIA\nAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDBEkAAIYIkgAADBEkAQAYIkgCADBEkAQA\nYIggCQDAEEESAIAhgiQAAEMESQAAhgiSAAAMESQBABgiSAIAMESQBABgiCAJAMAQQRIAgCGCJAAA\nQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDBEkAAIYIkgAADBEkAQAY\nIkgCADBEkAQAYIggCQDAEEHfAWbJAAAB7ElEQVQSAIAhgiQAAEMESQAAhgiSAAAMESQBABgiSAIA\nMESQBABgiCAJAMAQQRIAgCGCJAAAQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCA\nIZusdAcAWDdaa7XSfQA2LiqSAAAMESQBABgiSAIAMESQBABgiCAJAMAQQRIAgCGCJAAAQwRJAACG\nCJIAAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDqrW20n04l9WrV69/nQI2eFtvvXWt\ndB8ALkpUJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDBEkAAIYIkgAADBEkAQAYIkgCADBE\nkAQAYIggCQDAEEESAIAhgiQAAEMESQAAhgiSAAAMESQBABgiSAIAMESQBABgiCAJAMAQQRIAgCGC\nJAAAQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGBItdZWug8AAGyAVCQBABgiSAIAMESQBABgiCAJ\nAMAQQRIAgCGCJAAAQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDBEkA\nAIYIkgAADBEkAQAYIkgCADBEkAQAYIggCQDAEEESAIAhgiQAAEMESQAAhgiSAAAMESQBABgiSAIA\nMOT/A0y5NVatsS4uAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + } + ], "source": [ "obs = env.reset()\n", "for _ in range(25):\n", @@ -15525,38 +15561,38 @@ "plt.imshow(preprocess_observation(obs), interpolation='nearest', cmap='gray')\n", "plt.axis('off')\n", "plt.show()" - ], - "execution_count": 99, - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAApIAAAGgCAYAAAAZ0oddAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xe4ZVV5P/Dvq1hQmjIaARV/GitG\njbFB1GhsEUWMLSqKNbYYjWjsvfcWu6jYUGMvaBS7CGJvCBpRCAJShiKgIMr6/bH2wcPl3jvDYuDO\nMJ/P89yHe3ZZZ+199uV8z7vWPlOttQAAwHl1sZXuAAAAGyZBEgCAIYIkAABDBEkAAIYIkgAADBEk\nAQAYIkgOqqqnV9We63rbtWirVdVfn4/9H1xV+62LvlyYquotVfWsC6jt61XVd6uqLoj2WVxVfbuq\ndljpfgAwTpDM2eHqJ1X1+6r6bVW9uaq2Wm6f1tqLW2sPX5v2z8u251dV3XV6gz6tqlZX1fur6soX\nxnOvK4uF3dbao1prL7iAnvIFSV7Zpi9VrarHTsHyjKraa5H+Xaaq3lRVx1fVyVX19bl1VVUvm879\n6un38x1Qq+oWVbVvVZ1QVcdV1Yerapu59betqq9M/Tlskf2vNq3/fVUdUlW3X+a59qqqP1bVqdPz\n7VtV11mwzTZV9faqOmra7lfTfteZe742rTu1qo6Zztkl5pp5ZZLnn99zA8DK2eiDZFU9McnLkvxn\nki2T3CLJ9kn2rapLLrHPJhdeD9deVd0ryd5JXptkVZIdkpyRZL+qutyF2I/18vwsZgpjt03yibnF\nRyV5YZJ3LrHb25JcPsl1p/8+YW7dI5LcPckNk9wgyS5JHrkOunq56Xmvln59npLkXXPrT5v6+59L\n7P+BJD9IsnWS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SAIAMESQBABgiCAJAMAQQRIAgCGC\nJAAAQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGBItdZWug8AAGyAVCQBABgiSAIAMESQBABgiCAJ\nAMAQQRIAgCGCJAAAQwRJAACGCJIAAAwRJAEAGCJIAgAwRJAEAGCIIAkAwBBBEgCAIYIkAABDBEkA\nAIYIkgAADBEkAQAYIkgCADBEkAQAYIggCQDAEEESAIAhgiQAAEMESQAAhgiSAAAMESQBABgiSAIA\nMOT/A0y5NVatsS4uAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "tags": [] - } - } ] }, { "cell_type": "code", + "execution_count": 100, "metadata": {}, + "outputs": [], "source": [ "def combine_observations(preprocess_observations, dim_factor=0.75):\n", " dimmed = [obs * (dim_factor ** idx)\n", " for idx, obs in enumerate(reversed(preprocess_observations))]\n", " return np.max(np.array(dimmed), axis=0)" - ], - "execution_count": 100, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 101, "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAF4CAYAAAB9xrNzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEWVJREFUeJzt3HuwdXdd3/HPN3kSSMgN5CKRCDao\nhUBbRQ04KM8gCgkqGbHaglDoKIKDNqPSVMZLBAS1ZXhgxJF6i5pELral1U6dGuEJMJJaKB0vWBHJ\nDUgIJAFCSTTAr3+s36krh3POcwk55xvzes2cyd77t87av7323u+19trnSY0xAkBfx+z1BADYmVAD\nNCfUAM0JNUBzQg3QnFADNCfUe6iqLqyqi3cY//Oq2n8X3O/+qvrgnVzHRVX1si/UnHbLXbVN706q\n6r9V1b/4AqznYVU1qmrfF2JebE+ot1BVz6iqd1XVp6rquvn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qgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNq\ngOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgB\nmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZo\nTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqC5GmPs9RwA2IEjaoDmhBqg\nOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDm\nhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqguf8HSNWGQEW2Vh4AAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + } + ], "source": [ "n_observations_per_state = 3\n", "\n", @@ -15576,21 +15612,6 @@ "plt.imshow(img, interpolation='nearest', cmap='gray')\n", "plt.axis('off')\n", "plt.show()" - ], - "execution_count": 101, - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAF4CAYAAAB9xrNzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEWVJREFUeJzt3HuwdXdd3/HPN3kSSMgN5CKRCDao\nhUBbRQ04KM8gCgkqGbHaglDoKIKDNqPSVMZLBAS1ZXhgxJF6i5pELral1U6dGuEJMJJaKB0vWBHJ\nDUgIJAFCSTTAr3+s36krh3POcwk55xvzes2cyd77t87av7323u+19trnSY0xAkBfx+z1BADYmVAD\nNCfUAM0JNUBzQg3QnFADNCfUe6iqLqyqi3cY//Oq2n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GqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaE\nGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNq\ngOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgB\nmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZo\nTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqA5oQZoTqgBmhNqgOaEGqC5GmPs9RwA2IEjaoDmhBqg\nOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDm\nhBqgOaEGaE6oAZoTaoDmhBqgOaEGaE6oAZoTaoDmhBqguf8HSNWGQEW2Vh4AAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "tags": [] - } - } ] }, { @@ -15602,7 +15623,9 @@ }, { "cell_type": "code", + "execution_count": 102, "metadata": {}, + "outputs": [], "source": [ "reset_graph()\n", "\n", @@ -15622,9 +15645,7 @@ "n_outputs = env.action_space.n\n", "\n", "he_init = tf.contrib.layers.variance_scaling_initializer()" - ], - "execution_count": 102, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -15635,7 +15656,9 @@ }, { "cell_type": "code", + "execution_count": 103, "metadata": {}, + "outputs": [], "source": [ "def q_network(X_state, name):\n", " prev_layer = X_state\n", @@ -15658,13 +15681,13 @@ " trainable_vars_by_name = {var.name[len(scope.name):]: var\n", " for var in trainable_vars}\n", " return outputs, trainable_vars_by_name" - ], - "execution_count": 103, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 104, "metadata": {}, + "outputs": [], "source": [ "# Starting the DQN definition.\n", "\n", @@ -15674,13 +15697,13 @@ "target_q_values, target_vars = q_network(X_state, 'q_networks/target')\n", "copy_ops = [var.assign(online_vars[name]) for name, var in target_vars.items()]\n", "copy_online_to_target = tf.group(*copy_ops)" - ], - "execution_count": 104, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 105, "metadata": {}, + "outputs": [], "source": [ "# Defining the training objective.\n", "\n", @@ -15699,19 +15722,17 @@ " optimizer = tf.train.MomentumOptimizer(learning_rate, momentum,\n", " use_nesterov=True)\n", " training_op = optimizer.minimize(loss, global_step=global_step)" - ], - "execution_count": 105, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 106, "metadata": {}, + "outputs": [], "source": [ "init = tf.global_variables_initializer()\n", "saver = tf.train.Saver()" - ], - "execution_count": 106, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -15724,7 +15745,9 @@ }, { "cell_type": "code", + "execution_count": 107, "metadata": {}, + "outputs": [], "source": [ "class ReplayMemory(object):\n", " def __init__(self, maxlen):\n", @@ -15741,23 +15764,23 @@ "\n", " def sample(self, batch_size):\n", " return self.buf[np.random.randint(self.length, size=batch_size)]" - ], - "execution_count": 107, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 108, "metadata": {}, + "outputs": [], "source": [ "replay_size = 200000\n", "replay_memory = ReplayMemory(replay_size)" - ], - "execution_count": 108, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 109, "metadata": {}, + "outputs": [], "source": [ "def sample_memories(batch_size):\n", " cols = [[], [], [], [], []] # state, action, reward, next_state, continue\n", @@ -15767,9 +15790,7 @@ " cols = [np.array(col) for col in cols]\n", " return cols[0], cols[1], cols[2].reshape(-1, 1), cols[3], \\\n", " cols[4].reshape(-1, 1)" - ], - "execution_count": 109, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -15780,7 +15801,9 @@ }, { "cell_type": "code", + "execution_count": 110, "metadata": {}, + "outputs": [], "source": [ "eps_min = 0.1\n", "eps_max = 1.0\n", @@ -15792,9 +15815,7 @@ " if np.random.random() < epsilon:\n", " return np.random.randint(n_outputs)\n", " return np.argmax(q_values)" - ], - "execution_count": 110, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -15805,7 +15826,9 @@ }, { "cell_type": "code", + "execution_count": 111, "metadata": {}, + "outputs": [], "source": [ "n_steps = 10000000\n", "training_start = 100000\n", @@ -15824,13 +15847,13 @@ "mean_max_q = 0.0\n", "\n", "checkpoint_path = \"./pong_dqn.ckpt\"" - ], - "execution_count": 111, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 112, "metadata": {}, + "outputs": [], "source": [ "# Utility function to get the environment state for the model.\n", "\n", @@ -15848,13 +15871,22 @@ " preprocess_observations.append(preprocess_observation(obs))\n", " return combine_observations(preprocess_observations).reshape(80, 80, 1), \\\n", " total_reward, done" - ], - "execution_count": 112, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": 113, "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO:tensorflow:Restoring parameters from /content/gdrive/My Drive/models/pong_dqn.ckpt\n", + "Iteration 1056803\tTraining step 9291202/10000000 (92.9)%\tLoss 0.014324\tMean Max-Q 0.036826 " + ] + } + ], "source": [ "# Main training loop\n", "\n", @@ -15926,22 +15958,36 @@ " # Regularly save the model.\n", " if step and step % save_steps == 0:\n", " saver.save(sess, checkpoint_path)" - ], - "execution_count": 113, - "outputs": [ - { - "output_type": "stream", - "text": [ - "INFO:tensorflow:Restoring parameters from /content/gdrive/My Drive/models/pong_dqn.ckpt\n", - "Iteration 1056803\tTraining step 9291202/10000000 (92.9)%\tLoss 0.014324\tMean Max-Q 0.036826 " - ], - "name": "stdout" - } ] }, { "cell_type": "code", + "execution_count": 115, "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use standard file APIs to check for files with this prefix.\n", + "INFO:tensorflow:Restoring parameters from /content/gdrive/My Drive/models/pong_dqn.ckpt\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAANMAAAEACAYAAAAp2kPsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAA+tJREFUeJzt3cFNG0EAQFFvRAOJa0gHXOCOlIgW\n6CEShaCkB1pAOXCHCx2kBqcF5xAlkomDAX/ba/zebeX1ei5fs2PPwjCfzyfA+t7tegDwVogJImKC\niJggIiaIiAkiYoKImCAiJoiICSJHux7AMsMwPLnH6eun99saCvz15fvP4anXRxnTJmI5Oz150fm3\nd/drvX/ZNd6qh8vzhePjq5sXnf8cq645Bm7zICImiIgJIqNcM23CqvXLumuq11yD35ath16zrto1\nMxNExAQRMUHkYNZM1jPjtY/ro2XMTBARE0TEBJGDWTM9dij75vaB35mABWKCiJggIiaIHOwXEKt+\nxK03xvJ/+/hlwzJmJoiICSJigsgwxn929u3zh/ENioO36q8TmZkgIiaIjPI2bzabjW9QHLzpdOo2\nD7ZBTBARE0TEBBExQURMEBETRMQEETFBZJQ7IGx0ZYxsdIUtERNExAQRMUFETBARE0TEBBExQURM\nEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBAR\nE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNE\nxAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQE\nETFB5GjXA4BNeLg8Xzg+vrrZ+GeamSAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAi\nJoiICSJigoiHA3mTtvEw4GNmJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJi\ngoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKI\nmCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJgg\nIiaIiAkiYoKImCAiJoiICSJigoiYIHK06wFsytnpycLx7d39jkbCvrq4/jGZTCaT64uPzzrfzAQR\nMUFETBB5s2smWNdz10p/mJkgIiaIiAkiYoKImCAiJogM8/l812P4x2w2G9+gOHjT6XR46nUzE0TE\nBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBnlw4Gwj8xMEBETRMQEETFB\nREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURM\nEBETRH4BDcZWTLXJ8XUAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + } + ], "source": [ "preprocess_observations = []\n", "\n", @@ -15968,31 +16014,6 @@ "\n", " html = run_episode(dqn_policy, n_max_steps=10000)\n", "html" - ], - "execution_count": 115, - "outputs": [ - { - "output_type": "stream", - "text": [ - "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n", - "Instructions for updating:\n", - "Use standard file APIs to check for files with this prefix.\n", - "INFO:tensorflow:Restoring parameters from /content/gdrive/My Drive/models/pong_dqn.ckpt\n" - ], - "name": "stdout" - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAANMAAAEACAYAAAAp2kPsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAA+tJREFUeJzt3cFNG0EAQFFvRAOJa0gHXOCOlIgW\n6CEShaCkB1pAOXCHCx2kBqcF5xAlkomDAX/ba/zebeX1ei5fs2PPwjCfzyfA+t7tegDwVogJImKC\niJggIiaIiAkiYoKImCAiJoiICSJHux7AMsMwPLnH6eun99saCvz15fvP4anXRxnTJmI5Oz150fm3\nd/drvX/ZNd6qh8vzhePjq5sXnf8cq645Bm7zICImiIgJIqNcM23CqvXLumuq11yD35ath16zrto1\nMxNExAQRMUHkYNZM1jPjtY/ro2XMTBARE0TEBJGDWTM9dij75vaB35mABWKCiJggIiaIHOwXEKt+\nxK03xvJ/+/hlwzJmJoiICSJigsgwxn929u3zh/ENioO36q8TmZkgIiaIjPI2bzabjW9QHLzpdOo2\nD7ZBTBARE0TEBBExQURMEBETRMQEETFBZJQ7IGx0ZYxsdIUtERNExAQRMUFETBARE0TEBBExQURM\nEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBAR\nE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNE\nxAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQE\nETFB5GjXA4BNeLg8Xzg+vrrZ+GeamSAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAi\nJoiICSJigoiHA3mTtvEw4GNmJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJi\ngoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKI\nmCAiJoiICSJigoiYICImiIgJImKCiJggIiaIiAkiYoKImCAiJoiICSJigoiYICImiIgJImKCiJgg\nIiaIiAkiYoKImCAiJoiICSJigoiYIHK06wFsytnpycLx7d39jkbCvrq4/jGZTCaT64uPzzrfzAQR\nMUFETBB5s2smWNdz10p/mJkgIiaIiAkiYoKImCAiJogM8/l812P4x2w2G9+gOHjT6XR46nUzE0TE\nBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURMEBnlw4Gwj8xMEBETRMQEETFB\nREwQERNExAQRMUFETBARE0TEBBExQURMEBETRMQEETFBREwQERNExAQRMUFETBARE0TEBBExQURM\nEBETRH4BDcZWTLXJ8XUAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "tags": [] - } - } ] }, { @@ -16019,7 +16040,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/book_equations.ipynb b/book_equations.ipynb index c06b03a4c..c1e7f9202 100644 --- a/book_equations.ipynb +++ b/book_equations.ipynb @@ -8,7 +8,20 @@ "\n", "*This notebook lists all the equations in the book. If you decide to print them on a T-Shirt, I definitely want a copy! ;-)*\n", "\n", - "**Warning**: GitHub's notebook viewer does not render equations properly. You should either view this notebook within Jupyter itself or use [Jupyter's online viewer](http://nbviewer.jupyter.org/github/ageron/handson-ml/blob/master/book_equations.ipynb)." + "**Warning**: GitHub's notebook viewer does not render equations properly, but Jupyter or Colab work well.\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: these are the equations for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition equations and code." ] }, { @@ -1356,7 +1369,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.5" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/extra_autodiff.ipynb b/extra_autodiff.ipynb index 65a2f5427..2873c648e 100644 --- a/extra_autodiff.ipynb +++ b/extra_autodiff.ipynb @@ -11,7 +11,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_This notebook contains toy implementations of various autodiff techniques, to explain how they works._" + "_This notebook contains toy implementations of various autodiff techniques, to explain how they works._\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -1033,6 +1046,12 @@ "metadata": {}, "outputs": [], "source": [ + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "import tensorflow as tf" ] }, @@ -1144,7 +1163,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.2" + "version": "3.7.10" }, "nav_menu": { "height": "603px", diff --git a/extra_capsnets-cn.ipynb b/extra_capsnets-cn.ipynb index 3ce405143..a66299055 100644 --- a/extra_capsnets-cn.ipynb +++ b/extra_capsnets-cn.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# 胶囊网络(CapsNets) " + "**胶囊网络(CapsNets)**" ] }, { @@ -18,7 +18,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "部分启发来自于Huadong Liao的实现[CapsNet-TensorFlow](https://github.com/naturomics/CapsNet-Tensorflow)" + "部分启发来自于Huadong Liao的实现[CapsNet-TensorFlow](https://github.com/naturomics/CapsNet-Tensorflow)\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**警告**:这是本书第一版的代码。请访问 https://github.com/ageron/handson-ml2 获取第二版代码,其中包含使用最新库版本的最新笔记本。特别是,第一版基于TensorFlow 1,而第二版使用TensorFlow 2,使用起来更加简单。" ] }, { @@ -55,8 +68,8 @@ } ], "source": [ - "from IPython.display import HTML\n", - "HTML(\"\"\"\"\"\")" + "from IPython.display import IFrame\n", + "IFrame(src=\"https://www.youtube.com/embed/pPN8d0E3900\", width=560, height=315, frameborder=0, allowfullscreen=True)" ] }, { @@ -86,7 +99,7 @@ } ], "source": [ - "HTML(\"\"\"\"\"\")" + "IFrame(src=\"https://www.youtube.com/embed/2Kawrd5szHE\", width=560, height=315, frameborder=0, allowfullscreen=True)" ] }, { @@ -143,6 +156,12 @@ "metadata": {}, "outputs": [], "source": [ + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "import numpy as np\n", "import tensorflow as tf" ] @@ -2426,7 +2445,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.7.10" }, "toc": { "base_numbering": 1, diff --git a/extra_capsnets.ipynb b/extra_capsnets.ipynb index c7d243e59..f8467e6d3 100644 --- a/extra_capsnets.ipynb +++ b/extra_capsnets.ipynb @@ -4,21 +4,39 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Capsule Networks (CapsNets)" + "**Capsule Networks (CapsNets)**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Based on the paper: [Dynamic Routing Between Capsules](https://arxiv.org/abs/1710.09829), by Sara Sabour, Nicholas Frosst and Geoffrey E. Hinton (NIPS 2017)." + "*Based on the paper: [Dynamic Routing Between Capsules](https://arxiv.org/abs/1710.09829), by Sara Sabour, Nicholas Frosst and Geoffrey E. Hinton (NIPS 2017).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Inspired in part from Huadong Liao's implementation: [CapsNet-TensorFlow](https://github.com/naturomics/CapsNet-Tensorflow)." + "*Inspired in part from Huadong Liao's implementation: [CapsNet-TensorFlow](https://github.com/naturomics/CapsNet-Tensorflow).*" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -55,8 +73,8 @@ } ], "source": [ - "from IPython.display import HTML\n", - "HTML(\"\"\"\"\"\")" + "from IPython.display import IFrame\n", + "IFrame(src=\"https://www.youtube.com/embed/pPN8d0E3900\", width=560, height=315, frameborder=0, allowfullscreen=True)" ] }, { @@ -86,7 +104,7 @@ } ], "source": [ - "HTML(\"\"\"\"\"\")" + "IFrame(src=\"https://www.youtube.com/embed/2Kawrd5szHE\", width=560, height=315, frameborder=0, allowfullscreen=True)" ] }, { @@ -152,6 +170,12 @@ } ], "source": [ + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "import numpy as np\n", "import tensorflow as tf" ] @@ -2445,7 +2469,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/extra_gradient_descent_comparison.ipynb b/extra_gradient_descent_comparison.ipynb index f956cac12..fb39a3d88 100644 --- a/extra_gradient_descent_comparison.ipynb +++ b/extra_gradient_descent_comparison.ipynb @@ -4,14 +4,27 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Comparison of Batch, Mini-Batch and Stochastic Gradient Descent" + "**Comparison of Batch, Mini-Batch and Stochastic Gradient Descent**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook displays an animation comparing Batch, Mini-Batch and Stochastic Gradient Descent (introduced in Chapter 4). Thanks to [Daniel Ingram](https://github.com/daniel-s-ingram) who contributed this notebook." + "*This notebook displays an animation comparing Batch, Mini-Batch and Stochastic Gradient Descent (introduced in Chapter 4). Thanks to [Daniel Ingram](https://github.com/daniel-s-ingram) who contributed this notebook.*\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -1061,7 +1074,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/extra_tensorflow_reproducibility.ipynb b/extra_tensorflow_reproducibility.ipynb index 4360a61f2..363cca683 100644 --- a/extra_tensorflow_reproducibility.ipynb +++ b/extra_tensorflow_reproducibility.ipynb @@ -4,7 +4,68 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# TensorFlow Reproducibility" + "**TensorFlow Reproducibility**\n", + "\n", + "This notebook explains how to get fully reproducible code with TensorFlow.\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition project, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Watch [this video](https://youtu.be/Ys8ofBeR2kA) to understand the key ideas behind TensorFlow reproducibility:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import IFrame\n", + "IFrame(src=\"https://www.youtube.com/embed/Ys8ofBeR2kA\", width=560, height=315, frameborder=\"0\", allowfullscreen=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this is the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." ] }, { @@ -24,6 +85,12 @@ "source": [ "from __future__ import division, print_function, unicode_literals\n", "\n", + "try:\n", + " # %tensorflow_version only exists in Colab.\n", + " %tensorflow_version 1.x\n", + "except Exception:\n", + " pass\n", + "\n", "import numpy as np\n", "import tensorflow as tf\n", "from tensorflow import keras" @@ -1259,7 +1326,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/index.ipynb b/index.ipynb index 7dcc8638c..0f28dc913 100644 --- a/index.ipynb +++ b/index.ipynb @@ -10,6 +10,24 @@ "\n", "[Prerequisites](#Prerequisites) (see below)\n", "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this project contains the code for the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions. In particular, the 1st edition is based on TensorFlow 1, while the 2nd edition uses TensorFlow 2, which is much simpler to use." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "## Notebooks\n", "1. [The Machine Learning landscape](01_the_machine_learning_landscape.ipynb)\n", "2. [End-to-end Machine Learning project](02_end_to_end_machine_learning_project.ipynb)\n", @@ -26,23 +44,43 @@ "13. [Convolutional Neural Networks](13_convolutional_neural_networks.ipynb)\n", "14. [Recurrent Neural Networks](14_recurrent_neural_networks.ipynb)\n", "15. [Autoencoders](15_autoencoders.ipynb)\n", - "16. [Reinforcement Learning](16_reinforcement_learning.ipynb)\n", - "\n", + "16. [Reinforcement Learning](16_reinforcement_learning.ipynb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "## Scientific Python tutorials\n", "* [NumPy](tools_numpy.ipynb)\n", "* [Matplotlib](tools_matplotlib.ipynb)\n", - "* [Pandas](tools_pandas.ipynb)\n", - "\n", + "* [Pandas](tools_pandas.ipynb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "## Math Tutorials\n", "* [Linear Algebra](math_linear_algebra.ipynb)\n", - "* [Differential Calculus](math_differential_calculus.ipynb)\n", - "\n", + "* [Differential Calculus](math_differential_calculus.ipynb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "## Extra Material\n", "* [Capsule Networks](extra_capsnets.ipynb)\n", - "* [TensorFlow Reproducibility](extra_tensorflow_reproducibility.ipynb)\n", - "\n", + "* [TensorFlow Reproducibility](extra_tensorflow_reproducibility.ipynb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "## Misc.\n", - "* [Equations](book_equations.ipynb) (list of equations in the book)\n" + "* [Equations](book_equations.ipynb) (list of equations in the book)" ] }, { @@ -89,7 +127,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.7.10" }, "nav_menu": {}, "toc": { diff --git a/math_differential_calculus.ipynb b/math_differential_calculus.ipynb index 095b4b89a..85cdfa556 100644 --- a/math_differential_calculus.ipynb +++ b/math_differential_calculus.ipynb @@ -24,6 +24,13 @@ "" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." + ] + }, { "cell_type": "markdown", "metadata": { @@ -5994,7 +6001,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.7.10" } }, "nbformat": 4, diff --git a/math_linear_algebra.ipynb b/math_linear_algebra.ipynb index 13558445a..b9e41faca 100644 --- a/math_linear_algebra.ipynb +++ b/math_linear_algebra.ipynb @@ -8,7 +8,20 @@ "\n", "*Linear Algebra is the branch of mathematics that studies [vector spaces](https://en.wikipedia.org/wiki/Vector_space) and linear transformations between vector spaces, such as rotating a shape, scaling it up or down, translating it (ie. moving it), etc.*\n", "\n", - "*Machine Learning relies heavily on Linear Algebra, so it is essential to understand what vectors and matrices are, what operations you can perform with them, and how they can be useful.*" + "*Machine Learning relies heavily on Linear Algebra, so it is essential to understand what vectors and matrices are, what operations you can perform with them, and how they can be useful.*\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -4570,7 +4583,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.7.10" }, "toc": { "toc_cell": false, diff --git a/tools_matplotlib.ipynb b/tools_matplotlib.ipynb index 5095e98b4..d39e90d3d 100644 --- a/tools_matplotlib.ipynb +++ b/tools_matplotlib.ipynb @@ -6,7 +6,20 @@ "source": [ "**Tools - matplotlib**\n", "\n", - "*This notebook demonstrates how to use the matplotlib library to plot beautiful graphs.*" + "*This notebook demonstrates how to use the matplotlib library to plot beautiful graphs.*\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -72,9 +85,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", @@ -91,9 +102,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -126,7 +135,6 @@ "cell_type": "code", "execution_count": 5, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -156,9 +164,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -187,9 +193,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -221,9 +225,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -262,9 +264,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -294,9 +294,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -327,9 +325,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -358,9 +354,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -391,9 +385,7 @@ { "cell_type": "code", "execution_count": 13, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -423,7 +415,6 @@ "cell_type": "code", "execution_count": 14, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -459,7 +450,6 @@ "cell_type": "code", "execution_count": 15, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -492,7 +482,6 @@ "cell_type": "code", "execution_count": 16, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -537,9 +526,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -572,9 +559,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -618,7 +603,6 @@ "cell_type": "code", "execution_count": 19, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -680,9 +664,7 @@ { "cell_type": "code", "execution_count": 20, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -727,7 +709,6 @@ "cell_type": "code", "execution_count": 21, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -791,9 +772,7 @@ { "cell_type": "code", "execution_count": 22, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -834,9 +813,7 @@ { "cell_type": "code", "execution_count": 23, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -868,7 +845,6 @@ "cell_type": "code", "execution_count": 24, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -905,9 +881,7 @@ { "cell_type": "code", "execution_count": 25, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -944,9 +918,7 @@ { "cell_type": "code", "execution_count": 26, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -980,7 +952,6 @@ "cell_type": "code", "execution_count": 27, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1070,9 +1041,7 @@ { "cell_type": "code", "execution_count": 28, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1126,9 +1095,7 @@ { "cell_type": "code", "execution_count": 29, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1164,7 +1131,6 @@ "cell_type": "code", "execution_count": 30, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1204,9 +1170,7 @@ { "cell_type": "code", "execution_count": 31, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1242,9 +1206,7 @@ { "cell_type": "code", "execution_count": 32, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1274,9 +1236,7 @@ { "cell_type": "code", "execution_count": 33, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1307,7 +1267,6 @@ "cell_type": "code", "execution_count": 34, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1346,9 +1305,7 @@ { "cell_type": "code", "execution_count": 35, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1390,9 +1347,7 @@ { "cell_type": "code", "execution_count": 36, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1422,7 +1377,6 @@ "cell_type": "code", "execution_count": 37, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1469,9 +1423,7 @@ { "cell_type": "code", "execution_count": 38, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1498,9 +1450,7 @@ { "cell_type": "code", "execution_count": 39, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1528,9 +1478,7 @@ { "cell_type": "code", "execution_count": 40, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1559,9 +1507,7 @@ { "cell_type": "code", "execution_count": 41, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1605,7 +1551,6 @@ "cell_type": "code", "execution_count": 42, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1636,7 +1581,6 @@ "cell_type": "code", "execution_count": 43, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1672,7 +1616,6 @@ "cell_type": "code", "execution_count": 44, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1726,9 +1669,7 @@ { "cell_type": "code", "execution_count": 46, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2539,9 +2480,7 @@ { "cell_type": "code", "execution_count": 47, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "Writer = animation.writers['ffmpeg']\n", @@ -2585,5 +2524,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/tools_numpy.ipynb b/tools_numpy.ipynb index 6e195f4b5..3bd580d16 100644 --- a/tools_numpy.ipynb +++ b/tools_numpy.ipynb @@ -8,6 +8,24 @@ "\n", "*NumPy is the fundamental library for scientific computing with Python. NumPy is centered around a powerful N-dimensional array object, and it also contains useful linear algebra, Fourier transform, and random number functions.*\n", "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Creating arrays\n", "First let's make sure that this notebook works both in python 2 and 3:" ] @@ -58,9 +76,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -87,9 +103,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -127,9 +141,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -152,9 +164,7 @@ { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -174,9 +184,7 @@ { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -196,9 +204,7 @@ { "cell_type": "code", "execution_count": 8, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -226,9 +232,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -262,9 +266,7 @@ { "cell_type": "code", "execution_count": 10, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -294,9 +296,7 @@ { "cell_type": "code", "execution_count": 11, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -326,9 +326,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -359,7 +357,6 @@ "cell_type": "code", "execution_count": 13, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -390,9 +387,7 @@ { "cell_type": "code", "execution_count": 14, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -422,7 +417,6 @@ "cell_type": "code", "execution_count": 15, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -451,9 +445,7 @@ { "cell_type": "code", "execution_count": 16, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -480,9 +472,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -509,9 +499,7 @@ { "cell_type": "code", "execution_count": 18, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -540,9 +528,7 @@ { "cell_type": "code", "execution_count": 19, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -568,9 +554,7 @@ { "cell_type": "code", "execution_count": 20, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -599,9 +583,7 @@ { "cell_type": "code", "execution_count": 21, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -631,7 +613,6 @@ "cell_type": "code", "execution_count": 22, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [], @@ -643,9 +624,7 @@ { "cell_type": "code", "execution_count": 23, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -680,9 +659,7 @@ { "cell_type": "code", "execution_count": 24, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -741,7 +718,6 @@ "cell_type": "code", "execution_count": 25, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -761,9 +737,7 @@ { "cell_type": "code", "execution_count": 26, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -788,9 +762,7 @@ { "cell_type": "code", "execution_count": 27, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -818,9 +790,7 @@ { "cell_type": "code", "execution_count": 28, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -850,7 +820,6 @@ "cell_type": "code", "execution_count": 29, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -880,9 +849,7 @@ { "cell_type": "code", "execution_count": 30, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -923,9 +890,7 @@ { "cell_type": "code", "execution_count": 31, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -945,9 +910,7 @@ { "cell_type": "code", "execution_count": 32, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -973,7 +936,6 @@ "cell_type": "code", "execution_count": 33, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1010,7 +972,6 @@ "cell_type": "code", "execution_count": 34, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -1042,9 +1003,7 @@ { "cell_type": "code", "execution_count": 35, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1075,9 +1034,7 @@ { "cell_type": "code", "execution_count": 36, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1111,9 +1068,7 @@ { "cell_type": "code", "execution_count": 37, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1143,7 +1098,6 @@ "cell_type": "code", "execution_count": 38, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1202,9 +1156,7 @@ { "cell_type": "code", "execution_count": 39, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1232,9 +1184,7 @@ { "cell_type": "code", "execution_count": 40, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1262,9 +1212,7 @@ { "cell_type": "code", "execution_count": 41, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1293,9 +1241,7 @@ { "cell_type": "code", "execution_count": 42, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1323,9 +1269,7 @@ { "cell_type": "code", "execution_count": 43, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1353,9 +1297,7 @@ { "cell_type": "code", "execution_count": 44, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1384,9 +1326,7 @@ { "cell_type": "code", "execution_count": 45, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1422,9 +1362,7 @@ { "cell_type": "code", "execution_count": 46, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1442,9 +1380,7 @@ { "cell_type": "code", "execution_count": 47, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1469,9 +1405,7 @@ { "cell_type": "code", "execution_count": 48, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1503,9 +1437,7 @@ { "cell_type": "code", "execution_count": 49, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1533,9 +1465,7 @@ { "cell_type": "code", "execution_count": 50, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1562,9 +1492,7 @@ { "cell_type": "code", "execution_count": 51, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1601,9 +1529,7 @@ { "cell_type": "code", "execution_count": 52, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1633,9 +1559,7 @@ { "cell_type": "code", "execution_count": 53, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1665,9 +1589,7 @@ { "cell_type": "code", "execution_count": 54, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1694,9 +1616,7 @@ { "cell_type": "code", "execution_count": 55, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1718,9 +1638,7 @@ { "cell_type": "code", "execution_count": 56, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1748,9 +1666,7 @@ { "cell_type": "code", "execution_count": 57, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1770,9 +1686,7 @@ { "cell_type": "code", "execution_count": 58, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1800,9 +1714,7 @@ { "cell_type": "code", "execution_count": 59, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1831,9 +1743,7 @@ { "cell_type": "code", "execution_count": 60, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -1909,9 +1819,7 @@ { "cell_type": "code", "execution_count": 61, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1933,9 +1841,7 @@ { "cell_type": "code", "execution_count": 62, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1955,9 +1861,7 @@ { "cell_type": "code", "execution_count": 63, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1977,9 +1881,7 @@ { "cell_type": "code", "execution_count": 64, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2008,9 +1910,7 @@ { "cell_type": "code", "execution_count": 65, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2031,9 +1931,7 @@ { "cell_type": "code", "execution_count": 66, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2053,9 +1951,7 @@ { "cell_type": "code", "execution_count": 67, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2075,9 +1971,7 @@ { "cell_type": "code", "execution_count": 68, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2097,9 +1991,7 @@ { "cell_type": "code", "execution_count": 69, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2119,9 +2011,7 @@ { "cell_type": "code", "execution_count": 70, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2148,9 +2038,7 @@ { "cell_type": "code", "execution_count": 71, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2178,9 +2066,7 @@ { "cell_type": "code", "execution_count": 72, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2209,9 +2095,7 @@ { "cell_type": "code", "execution_count": 73, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2240,7 +2124,6 @@ "cell_type": "code", "execution_count": 74, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -2269,9 +2152,7 @@ { "cell_type": "code", "execution_count": 75, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -2298,9 +2179,7 @@ { "cell_type": "code", "execution_count": 76, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2322,9 +2201,7 @@ { "cell_type": "code", "execution_count": 77, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2352,9 +2229,7 @@ { "cell_type": "code", "execution_count": 78, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2376,9 +2251,7 @@ { "cell_type": "code", "execution_count": 79, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2407,9 +2280,7 @@ { "cell_type": "code", "execution_count": 80, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2433,9 +2304,7 @@ { "cell_type": "code", "execution_count": 81, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2455,9 +2324,7 @@ { "cell_type": "code", "execution_count": 82, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2477,9 +2344,7 @@ { "cell_type": "code", "execution_count": 83, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2507,7 +2372,6 @@ "cell_type": "code", "execution_count": 84, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -2529,9 +2393,7 @@ { "cell_type": "code", "execution_count": 85, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2567,7 +2429,6 @@ "cell_type": "code", "execution_count": 86, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -2590,9 +2451,7 @@ { "cell_type": "code", "execution_count": 87, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2622,9 +2481,7 @@ { "cell_type": "code", "execution_count": 88, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2652,9 +2509,7 @@ { "cell_type": "code", "execution_count": 89, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2685,9 +2540,7 @@ { "cell_type": "code", "execution_count": 90, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2707,9 +2560,7 @@ { "cell_type": "code", "execution_count": 91, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2736,9 +2587,7 @@ { "cell_type": "code", "execution_count": 92, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2766,9 +2615,7 @@ { "cell_type": "code", "execution_count": 93, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2789,9 +2636,7 @@ { "cell_type": "code", "execution_count": 94, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2811,9 +2656,7 @@ { "cell_type": "code", "execution_count": 95, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2834,7 +2677,6 @@ "cell_type": "code", "execution_count": 96, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -2867,9 +2709,7 @@ { "cell_type": "code", "execution_count": 97, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2893,9 +2733,7 @@ { "cell_type": "code", "execution_count": 98, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2917,9 +2755,7 @@ { "cell_type": "code", "execution_count": 99, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2951,9 +2787,7 @@ { "cell_type": "code", "execution_count": 100, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -2974,9 +2808,7 @@ { "cell_type": "code", "execution_count": 101, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3004,9 +2836,7 @@ { "cell_type": "code", "execution_count": 102, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3034,9 +2864,7 @@ { "cell_type": "code", "execution_count": 103, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3063,9 +2891,7 @@ { "cell_type": "code", "execution_count": 104, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -3091,9 +2917,7 @@ { "cell_type": "code", "execution_count": 105, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -3126,9 +2950,7 @@ { "cell_type": "code", "execution_count": 106, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -3177,9 +2999,7 @@ { "cell_type": "code", "execution_count": 107, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3202,9 +3022,7 @@ { "cell_type": "code", "execution_count": 108, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3228,9 +3046,7 @@ { "cell_type": "code", "execution_count": 109, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3261,9 +3077,7 @@ { "cell_type": "code", "execution_count": 110, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3293,9 +3107,7 @@ { "cell_type": "code", "execution_count": 111, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3325,9 +3137,7 @@ { "cell_type": "code", "execution_count": 112, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3350,9 +3160,7 @@ { "cell_type": "code", "execution_count": 113, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3379,9 +3187,7 @@ { "cell_type": "code", "execution_count": 114, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -3409,9 +3215,7 @@ { "cell_type": "code", "execution_count": 115, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3441,9 +3245,7 @@ { "cell_type": "code", "execution_count": 116, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3478,9 +3280,7 @@ { "cell_type": "code", "execution_count": 117, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3507,9 +3307,7 @@ { "cell_type": "code", "execution_count": 118, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3539,9 +3337,7 @@ { "cell_type": "code", "execution_count": 119, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3574,9 +3370,7 @@ { "cell_type": "code", "execution_count": 120, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3598,9 +3392,7 @@ { "cell_type": "code", "execution_count": 121, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3621,9 +3413,7 @@ { "cell_type": "code", "execution_count": 122, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3651,9 +3441,7 @@ { "cell_type": "code", "execution_count": 123, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3679,9 +3467,7 @@ { "cell_type": "code", "execution_count": 124, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3716,9 +3502,7 @@ { "cell_type": "code", "execution_count": 125, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3756,9 +3540,7 @@ { "cell_type": "code", "execution_count": 126, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3785,9 +3567,7 @@ { "cell_type": "code", "execution_count": 127, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3814,9 +3594,7 @@ { "cell_type": "code", "execution_count": 128, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3844,9 +3622,7 @@ { "cell_type": "code", "execution_count": 129, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3873,9 +3649,7 @@ { "cell_type": "code", "execution_count": 130, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3904,9 +3678,7 @@ { "cell_type": "code", "execution_count": 131, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3937,9 +3709,7 @@ { "cell_type": "code", "execution_count": 132, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3961,9 +3731,7 @@ { "cell_type": "code", "execution_count": 133, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -3995,7 +3763,6 @@ "cell_type": "code", "execution_count": 134, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -4019,7 +3786,6 @@ "cell_type": "code", "execution_count": 135, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -4048,9 +3814,7 @@ { "cell_type": "code", "execution_count": 136, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4071,9 +3835,7 @@ { "cell_type": "code", "execution_count": 137, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4105,9 +3867,7 @@ { "cell_type": "code", "execution_count": 138, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4129,9 +3889,7 @@ { "cell_type": "code", "execution_count": 139, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4156,9 +3914,7 @@ { "cell_type": "code", "execution_count": 140, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4194,9 +3950,7 @@ { "cell_type": "code", "execution_count": 141, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4221,9 +3975,7 @@ { "cell_type": "code", "execution_count": 142, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4252,9 +4004,7 @@ { "cell_type": "code", "execution_count": 143, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4284,9 +4034,7 @@ { "cell_type": "code", "execution_count": 144, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4315,9 +4063,7 @@ { "cell_type": "code", "execution_count": 145, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4347,9 +4093,7 @@ { "cell_type": "code", "execution_count": 146, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4372,9 +4116,7 @@ { "cell_type": "code", "execution_count": 147, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4396,9 +4138,7 @@ { "cell_type": "code", "execution_count": 148, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4428,9 +4168,7 @@ { "cell_type": "code", "execution_count": 149, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4458,9 +4196,7 @@ { "cell_type": "code", "execution_count": 150, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4481,9 +4217,7 @@ { "cell_type": "code", "execution_count": 151, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4505,9 +4239,7 @@ { "cell_type": "code", "execution_count": 152, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4537,9 +4269,7 @@ { "cell_type": "code", "execution_count": 153, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4563,9 +4293,7 @@ { "cell_type": "code", "execution_count": 154, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4589,9 +4317,7 @@ { "cell_type": "code", "execution_count": 155, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4618,9 +4344,7 @@ { "cell_type": "code", "execution_count": 156, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4645,9 +4369,7 @@ { "cell_type": "code", "execution_count": 157, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4671,9 +4393,7 @@ { "cell_type": "code", "execution_count": 158, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4703,9 +4423,7 @@ { "cell_type": "code", "execution_count": 159, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4725,9 +4443,7 @@ { "cell_type": "code", "execution_count": 160, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4764,9 +4480,7 @@ { "cell_type": "code", "execution_count": 161, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4796,9 +4510,7 @@ { "cell_type": "code", "execution_count": 162, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4826,7 +4538,6 @@ "cell_type": "code", "execution_count": 163, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -4858,9 +4569,7 @@ { "cell_type": "code", "execution_count": 164, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "import math\n", @@ -4880,9 +4589,7 @@ { "cell_type": "code", "execution_count": 165, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4911,9 +4618,7 @@ { "cell_type": "code", "execution_count": 166, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -4948,9 +4653,7 @@ { "cell_type": "code", "execution_count": 167, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "data = np.sin(X*Y/40.5)" @@ -4966,9 +4669,7 @@ { "cell_type": "code", "execution_count": 168, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5004,7 +4705,6 @@ "cell_type": "code", "execution_count": 169, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [ @@ -5028,9 +4728,7 @@ { "cell_type": "code", "execution_count": 170, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "np.save(\"my_array\", a)" @@ -5046,9 +4744,7 @@ { "cell_type": "code", "execution_count": 171, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5078,9 +4774,7 @@ { "cell_type": "code", "execution_count": 172, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5110,9 +4804,7 @@ { "cell_type": "code", "execution_count": 173, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "np.savetxt(\"my_array.csv\", a)" @@ -5128,9 +4820,7 @@ { "cell_type": "code", "execution_count": 174, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -5175,9 +4865,7 @@ { "cell_type": "code", "execution_count": 176, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5207,9 +4895,7 @@ { "cell_type": "code", "execution_count": 177, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5254,9 +4940,7 @@ { "cell_type": "code", "execution_count": 179, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5286,9 +4970,7 @@ { "cell_type": "code", "execution_count": 180, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5316,9 +4998,7 @@ { "cell_type": "code", "execution_count": 181, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5338,9 +5018,7 @@ { "cell_type": "code", "execution_count": 182, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -5401,5 +5079,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/tools_pandas.ipynb b/tools_pandas.ipynb index 030232c62..875602369 100644 --- a/tools_pandas.ipynb +++ b/tools_pandas.ipynb @@ -9,7 +9,20 @@ "*The `pandas` library provides high-performance, easy-to-use data structures and data analysis tools. The main data structure is the `DataFrame`, which you can think of as an in-memory 2D table (like a spreadsheet, with column names and row labels). Many features available in Excel are available programmatically, such as creating pivot tables, computing columns based on other columns, plotting graphs, etc. You can also group rows by column value, or join tables much like in SQL. Pandas is also great at handling time series.*\n", "\n", "Prerequisites:\n", - "* NumPy – if you are not familiar with NumPy, we recommend that you go through the [NumPy tutorial](tools_numpy.ipynb) now." + "* NumPy – if you are not familiar with NumPy, we recommend that you go through the [NumPy tutorial](tools_numpy.ipynb) now.\n", + "\n", + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Warning**: this notebook accompanies the 1st edition of the book. Please visit https://github.com/ageron/handson-ml2 for the 2nd edition code, with up-to-date notebooks using the latest library versions." ] }, { @@ -12106,7 +12119,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.7.10" }, "toc": { "toc_cell": false,