Merge pull request #109 from yrahal/main

Typo fixes in Notebooks/Chap03/3_3_Shallow_Network_Regions.ipynb
This commit is contained in:
udlbook
2023-12-17 17:22:27 -05:00
committed by GitHub

View File

@@ -48,7 +48,7 @@
"import numpy as np\n", "import numpy as np\n",
"# Imports plotting library\n", "# Imports plotting library\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"# Imports math libray\n", "# Imports math library\n",
"import math" "import math"
], ],
"metadata": { "metadata": {
@@ -102,7 +102,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"# Calculate the number of regions for 10D input (Di=2) and 50 hidden units (D=50)\n", "# Calculate the number of regions for 10D input (Di=10) and 50 hidden units (D=50)\n",
"N = number_regions(10, 50)\n", "N = number_regions(10, 50)\n",
"print(f\"Di=10, D=50, Number of regions = {int(N)}, True value = 13432735556\")" "print(f\"Di=10, D=50, Number of regions = {int(N)}, True value = 13432735556\")"
], ],
@@ -126,7 +126,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"# Show that calculation fails when $D_i < D$\n", "# Show that calculation fails when $D_i > D$\n",
"try:\n", "try:\n",
" N = number_regions(10, 8)\n", " N = number_regions(10, 8)\n",
" print(f\"Di=10, D=8, Number of regions = {int(N)}, True value = 256\")\n", " print(f\"Di=10, D=8, Number of regions = {int(N)}, True value = 256\")\n",