Created using Colaboratory

This commit is contained in:
udlbook
2023-10-12 18:07:26 +01:00
parent 0515940ace
commit af77c76435

View File

@@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyMaBcw5e/SBWZVAXWbs5YSn",
"authorship_tag": "ABX9TyM+98aMABiK5vNFFYAwiPiL",
"include_colab_link": true
},
"kernelspec": {
@@ -301,8 +301,9 @@
"source": [
"# Least squares function\n",
"def least_squares_loss(y_train, y_predict):\n",
" # TODO Replace the line below to use compute the sum of squared\n",
" # differences between the real and predicted values of y\n",
" # TODO Replace the line below to compute the sum of squared\n",
" # differences between the real values of y and the predicted values from the model f[x_i,phi]\n",
" # (see figure 2.2 of the book)\n",
" # you will need to use the function np.sum\n",
" loss = 0\n",
"\n",