diff --git a/Notebooks/Chap09/9_3_Ensembling.ipynb b/Notebooks/Chap09/9_3_Ensembling.ipynb index 3335c06..be9b343 100644 --- a/Notebooks/Chap09/9_3_Ensembling.ipynb +++ b/Notebooks/Chap09/9_3_Ensembling.ipynb @@ -52,7 +52,7 @@ "# import libraries\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", - "# Define seed so get same results each time\n", + "# Define seed to get same results each time\n", "np.random.seed(1)" ] }, @@ -80,7 +80,7 @@ " for i in range(n_data):\n", " x[i] = np.random.uniform(i/n_data, (i+1)/n_data, 1)\n", "\n", - " # y value from running through functoin and adding noise\n", + " # y value from running through function and adding noise\n", " y = np.ones(n_data)\n", " for i in range(n_data):\n", " y[i] = true_function(x[i])\n", @@ -96,7 +96,7 @@ { "cell_type": "code", "source": [ - "# Draw the fitted function, together win uncertainty used to generate points\n", + "# Draw the fitted function, together with uncertainty used to generate points\n", "def plot_function(x_func, y_func, x_data=None,y_data=None, x_model = None, y_model =None, sigma_func = None, sigma_model=None):\n", "\n", " fig,ax = plt.subplots()\n", @@ -137,7 +137,7 @@ "n_data = 15\n", "x_data,y_data = generate_data(n_data, sigma_func)\n", "\n", - "# Plot the functinon, data and uncertainty\n", + "# Plot the function, data and uncertainty\n", "plot_function(x_func, y_func, x_data, y_data, sigma_func=sigma_func)" ], "metadata": { @@ -216,7 +216,7 @@ "# Closed form solution\n", "beta, omega = fit_model_closed_form(x_data,y_data,n_hidden=14)\n", "\n", - "# Get prediction for model across graph grange\n", + "# Get prediction for model across graph range\n", "x_model = np.linspace(0,1,100);\n", "y_model = network(x_model, beta, omega)\n", "\n", @@ -297,7 +297,7 @@ { "cell_type": "code", "source": [ - "# Plot the median of the results\n", + "# Plot the mean of the results\n", "# TODO -- find the mean prediction\n", "# Replace this line\n", "y_model_mean = all_y_model[0,:]\n", @@ -325,4 +325,4 @@ } } ] -} \ No newline at end of file +}