Skip to content

Commit

Permalink
Corrected typo
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrangan committed Feb 12, 2019
1 parent 8456f2e commit d9a8aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unit05_lasso/lasso_in_class.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
"To fit the sinusoidal model, we will write a function to map the values `t` to \n",
"the `sin` and `cos` features. Finish the function `transform` that creates matrices:\n",
"\n",
" Xcos[i,j] = np.cos(2*np.pi*cos(2*np.pi*t[i]*freq[j])\n",
" Xsin[i,j] = np.cos(2*np.pi*sin(2*np.pi*t[i]*freq[j])\n",
" Xcos[i,j] = np.cos(2*np.pi*t[i]*freq[j])\n",
" Xsin[i,j] = np.sin(2*np.pi*t[i]*freq[j])\n",
" X = np.hstack((Xcos,Xsin))\n",
" \n",
"So, if `freq` is length `d`, there will `2*d` features. You can try to create the matrices using python broadcasting if you want to avoid a for loop. "
Expand Down

0 comments on commit d9a8aa9

Please sign in to comment.