Skip to content

Commit bcade56

Browse files
committed
Created using Colaboratory
1 parent 2ed641d commit bcade56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lab3/solutions/Lab3_Part_1_Introduction_to_CAPSA.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"source": [
118118
"## 1.1 Dataset\n",
119119
"\n",
120-
"We will build understanding of bias and uncertainty by training a neural network for a simple 2D regression task: modeling the function $y = x^3$. We will use `CAPSA` to analyze this dataset and the performance of the model. Noise and missing-ness will be injected into the dataset.\n",
120+
"We will build understanding of bias and uncertainty by training a neural network for a simple 2D regression task: modeling the function $y = x^3$. We will use Capsa to analyze this dataset and the performance of the model. Noise and missing-ness will be injected into the dataset.\n",
121121
"\n",
122122
"Let's generate the dataset and visualize it:"
123123
]
@@ -131,6 +131,7 @@
131131
"outputs": [],
132132
"source": [
133133
"# Get the data for the cubic function, injected with noise and missing-ness\n",
134+
"# This is just a toy dataset that we can use to test some of the wrappers on\n",
134135
"def gen_data(x_min, x_max, n, train=True):\n",
135136
" if train: \n",
136137
" x = np.random.triangular(x_min, 2, x_max, size=(n, 1))\n",
@@ -211,7 +212,7 @@
211212
")\n",
212213
"\n",
213214
"# Train the model for 30 epochs using model.fit().\n",
214-
"loss_history = dense_NN.fit(x_train, y_train, epochs=30, verbose=0)"
215+
"loss_history = dense_NN.fit(x_train, y_train, epochs=30)"
215216
]
216217
},
217218
{
@@ -319,7 +320,7 @@
319320
")\n",
320321
"\n",
321322
"# Train the wrapped model for 30 epochs.\n",
322-
"loss_history_bias_wrap = bias_wrapped_dense_NN.fit(x_train, y_train, epochs=30, verbose=0)\n",
323+
"loss_history_bias_wrap = bias_wrapped_dense_NN.fit(x_train, y_train, epochs=30)\n",
323324
"\n",
324325
"print(\"Done training model with Bias Wrapper!\")"
325326
]

0 commit comments

Comments
 (0)