User Tools

Site Tools


cs501r_f2016:lab2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cs501r_f2016:lab2 [2016/09/02 04:43]
wingated
cs501r_f2016:lab2 [2016/09/02 04:45]
wingated
Line 97: Line 97:
 You should also test different step sizes. Wikipedia doesn'​t discuss how to do this, but it should be straightforward for you to figure out; the algorithm description in the lecture notes includes the step size.  (But try to figure it out: consider the update equation for a weight, and ask yourself: where should I put a stepsize parameter, to be able to adjust the magnitude of the weight update?​) ​ You should also test different step sizes. Wikipedia doesn'​t discuss how to do this, but it should be straightforward for you to figure out; the algorithm description in the lecture notes includes the step size.  (But try to figure it out: consider the update equation for a weight, and ask yourself: where should I put a stepsize parameter, to be able to adjust the magnitude of the weight update?​) ​
  
-For the Iris dataset, you should test ''​c=1'',​ ''​c=0.1'',​ ''​c=0.01''​.+For the Iris dataset, you should test at least ''​c=1'',​ ''​c=0.1'',​ ''​c=0.01''​.
  
-For the CIFAR-10 dataset, you should test ''​c=0.001'',​ ''​c=0.00001''​.+For the CIFAR-10 dataset, you should test at least ''​c=0.001'',​ ''​c=0.00001''​.
  
  
Line 114: Line 114:
 <code python> <code python>
 import matplotlib.pyplot as plt import matplotlib.pyplot as plt
-<​code>​+</code>
  
 To create a new figure, call ''​plt.figure''​. ​ To plot a line, call ''​plt.plot''​. ​ Note that if you pass a matrix into ''​plt.plot'',​ it will plot multiple lines at once, each with a different color; each column will generate a new line. To create a new figure, call ''​plt.figure''​. ​ To plot a line, call ''​plt.plot''​. ​ Note that if you pass a matrix into ''​plt.plot'',​ it will plot multiple lines at once, each with a different color; each column will generate a new line.
Line 121: Line 121:
  
 Don't forget to label your axes! Don't forget to label your axes!
 +
 +You may find [[http://​matplotlib.org/​users/​pyplot_tutorial.html|this tutorial on pyplot]] helpful.
  
 ---- ----
cs501r_f2016/lab2.txt ยท Last modified: 2021/06/30 23:42 (external edit)