Created using Colaboratory
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user