|
|
Line 3: |
Line 3: |
| '''Submission instructions''': | | '''Submission instructions''': |
| email both a PDF of your solutions as well as your code (.m or .py files) as attachments to: | | email both a PDF of your solutions as well as your code (.m or .py files) as attachments to: |
| rctn.org vs265 (vs265 should be out front) | | vs265 AT rctn.org |
| You can hand in a paper copy of your solutions before class, but you still have to email your code to the address above before the assignment is due. | | You can hand in a paper copy of your solutions before class, but you still have to email your code to the address above before the assignment is due. |
|
| |
|
| = Resources = | | = Resources = |
| == Matlab == | | == Matlab == |
| Amir, the past GSI for the course says "There is a guide to Matlab on the web by Kevin Murphy which is really excellent. I think it would be great for the VS265 students: [http://code.google.com/p/yagtom/ http://code.google.com/p/yagtom/]"
| | There is an excellent guide to Matlab by Kevin Murphy on the web: [http://code.google.com/p/yagtom/ http://code.google.com/p/yagtom/] |
|
| |
|
| == Python == | | == Python == |
| Fernando Perez at the Brain Imaging Center has an ''excellent'' set of resources on [http://fperez.org/py4science/index.html Python for scientific computing]. You will likely find the [http://fperez.org/py4science/starter_kit.html "Starter Kit"] particularly useful. | | Fernando Perez at the Brain Imaging Center has an excellent set of resources on [http://fperez.org/py4science/index.html Python for scientific computing]. You will likely find the [http://fperez.org/py4science/starter_kit.html "Starter Kit"] particularly useful. |
|
| |
|
| = Assignments = | | = Assignments = |
| ==== Lab #1, due Wednesday, September 5th at beginning of class ==== | | ==== Lab #1, due Thursday, September 11 at beginning of class ==== |
|
| |
|
| * [http://redwood.berkeley.edu/vs265/lab1.pdf lab1.pdf] [http://redwood.berkeley.edu/w/images/e/ef/Hw1_soln_bilenko.pdf Solution.pdf] | | <--! * [http://redwood.berkeley.edu/vs265/lab1.pdf lab1.pdf] [http://redwood.berkeley.edu/w/images/e/ef/Hw1_soln_bilenko.pdf Solution.pdf] --> |
| | |
| ==== Lab #2, due Wednesday, September 19th at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab2.pdf lab2.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/data.mat data.mat]
| |
| | |
| ''for Python: either ...''
| |
| In [1]: import scipy.io
| |
| In [2]: d = scipy.io.loadmat("data.mat")
| |
| In [3]: X,O = d['X'],d['O']
| |
| | |
| ''or use [http://redwood.berkeley.edu/vs265/data.npz data.npz]''
| |
| In [1]: import numpy as np
| |
| In [2]: d = np.load('data.npz')
| |
| In [3]: X,O = d['X'],d['O']
| |
| | |
| * [http://redwood.berkeley.edu/vs265/apples.mat apples.mat]
| |
| * [http://redwood.berkeley.edu/vs265/oranges.mat oranges.mat]
| |
| * [http://redwood.berkeley.edu/vs265/lab2s.m lab2s.m] or [http://redwood.berkeley.edu/vs265/lab2s.txt lab2s.py]
| |
| *[http://redwood.berkeley.edu/w/images/2/2c/Hw2_sol.zip Solution_scripts] [http://redwood.berkeley.edu/w/images/0/05/Solution.pdf Writeup]
| |
| | |
| ==== Lab #3, due Wednesday, Sept. 26 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab3.pdf lab3.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/apples2.mat apples2.mat]
| |
| * [http://redwood.berkeley.edu/vs265/oranges2.mat oranges2.mat]
| |
| * [http://redwood.berkeley.edu/vs265/lab3.m lab3.m]
| |
| | |
| ''For Python you can use [http://redwood.berkeley.edu/vs265/apples-oranges.npz apples-oranges.npz]''
| |
| In [1]: import numpy as np
| |
| In [2]: d = np.load('apples-oranges.npz')
| |
| In [3]: d.keys()
| |
| Out[3]: ['oranges2', 'apples2', 'apples', 'oranges']
| |
| | |
| * [http://redwood.berkeley.edu/w/images/9/9d/Hw3_writeup.pdf Solution.pdf] [http://redwood.berkeley.edu/w/images/a/af/Hw3scripts.zip HW3_Scripts]
| |
| | |
| ==== Lab #4, due Thursday, October 4 at 9:00 ====
| |
| * [http://redwood.berkeley.edu/vs265/lab4.pdf lab4.pdf]
| |
| Matlab code are as separate files below.
| |
| * [http://redwood.berkeley.edu/vs265/lab4/data2d.mat data2d.mat]
| |
| * [http://redwood.berkeley.edu/vs265/lab4/faces2.mat faces2.mat]
| |
| * [http://redwood.berkeley.edu/vs265/lab4/hebb.m hebb.m]
| |
| * [http://redwood.berkeley.edu/vs265/lab4/eigmovie.m eigmovie.m]
| |
| | |
| ''For Python you can use ''
| |
| * [http://redwood.berkeley.edu/vs265/lab4/data2d.npz data2d.npz] (see previous assignments above for how to read this in)
| |
| * [http://redwood.berkeley.edu/vs265/lab4/faces2.npz faces2.npz]
| |
| * [http://redwood.berkeley.edu/vs265/lab4/hebb.txt hebb.py]
| |
| * [http://redwood.berkeley.edu/vs265/lab4/eigmovie.txt eigmovie.py]
| |
| | |
| * [http://redwood.berkeley.edu/vs265/sols/hw3-08.pdf Solutions.pdf] This is a solution from a previous version of this class that is really well written.
| |
| | |
| ==== Lab #5, due Monday, Oct 15 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab5.pdf lab5]
| |
| * [http://redwood.berkeley.edu/vs265/foldiak_class_scripts.zip foldiak scripts (zip)]
| |
| * [http://redwood.berkeley.edu/vs265/sparsenet_class_scripts.zip sparsenet scripts (zip)]
| |
| * You will also need the following set of whitened natural movie images: [https://redwood.berkeley.edu/bruno/sparsenet/IMAGES.mat IMAGES.mat]
| |
| * Solutions [http://redwood.berkeley.edu/w/images/4/41/Hw5_sol_scripts.zip Scripts] [http://redwood.berkeley.edu/w/images/b/b4/Lab5_soln.pdf Writeup]
| |
| | |
| ==== Lab #6, due Wednesday, Oct 24 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab6.pdf lab6]
| |
| * [http://redwood.berkeley.edu/vs265/lab6/kohonen.m kohonen.m]
| |
| * [http://redwood.berkeley.edu/vs265/lab6/showrfs.m showrfs.m]
| |
| | |
| ''Python code:''
| |
| * [http://redwood.berkeley.edu/vs265/lab6/kohonen.txt kohonen.py]
| |
| * [http://redwood.berkeley.edu/vs265/lab6/showrfs.txt showrfs.py]
| |
| [http://redwood.berkeley.edu/w/images/8/8c/Solution6.pdf Solution]
| |
| | |
| ==== Lab #7, due Wednesday, Oct 31 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab7.pdf lab7.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/lab7/patterns.mat patterns.mat]
| |
| * [http://redwood.berkeley.edu/vs265/lab7/hopnet.m hopnet.m]
| |
| * [http://redwood.berkeley.edu/vs265/lab7/corrupt.m corrupt.m]
| |
| * [http://redwood.berkeley.edu/vs265/lab7/genpat.m genpat.m]
| |
| | |
| ''Python code:''
| |
| * [http://redwood.berkeley.edu/vs265/lab7/hopnet.txt hopnet.py] - python version of the above code as one file (with run, genpat, and corrupt methods)
| |
| * [http://redwood.berkeley.edu/vs265/lab7/patterns.npz patterns.npz]
| |
| p = np.load('patterns.npz')
| |
| face,hi,X = p['face'], p['hi'], p['X']
| |
| | |
| # if you load patterns.mat, use:
| |
| p = scipy.io.loadmat("patterns.mat")
| |
| face,hi,X = [p[k].reshape(10,10).T.reshape(100,1) for k in 'face','hi','X']
| |
| # line above converts Fortran to C ordering
| |
| * Solutions: The outer product rule to calculate V is given by X*X' + face*face' + hi*hi'; *
| |
| [http://redwood.berkeley.edu/w/images/d/d1/Abbott_ps7.pdf Writeup]
| |
| [http://redwood.berkeley.edu/w/images/2/29/Scripts.zip Scripts]
| |
| | |
| ==== Lab #8, due Wednesday, Nov. 14 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab8.pdf lab8.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/mog/mog.m mog.m]
| |
| * [http://redwood.berkeley.edu/vs265/mog/show_mog.m show_mog.m]
| |
| * [http://redwood.berkeley.edu/vs265/mog/X1.mat X1.mat]
| |
| * [http://redwood.berkeley.edu/vs265/mog/X1_v6.mat X1_v6.mat] (version 6)
| |
| * [http://redwood.berkeley.edu/vs265/mog/X2.mat X2.mat]
| |
| * [http://redwood.berkeley.edu/vs265/mog/X2_v6.mat X2_v6.mat] (version 6)
| |
| * [http://redwood.berkeley.edu/w/images/f/fc/Hw8_solution.pdf Solution]
| |
| | |
| ==== Lab #9 (optional), due Monday, Nov. 26 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab9.pdf lab9.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/boltz.m boltz.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/get_batch.m get_batch.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/sample.m sample.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/draw.m draw.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/sigmoid.m sigmoid.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/scribble.mat scribble.mat]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/scribble_v6.mat scribble_v6.mat] (version 6)
| |
| * [http://redwood.berkeley.edu/vs265/boltz/extract_patches.m extract_patches.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/prob.m prob.m]
| |
| * [http://redwood.berkeley.edu/vs265/boltz/show_patches.m show_patches.m]
| |
| | |
| ''Python code:''
| |
| * [http://redwood.berkeley.edu/vs265/lab9/boltz.txt boltz.py] - python version of the above code with solution.
| |
| * [http://redwood.berkeley.edu/w/images/9/9c/Lab9_soln.pdf Writeup with code]
| |
| | |
| ==== Lab #10 (optional), due Monday, Dec. 3 at beginning of class ====
| |
| * [http://redwood.berkeley.edu/vs265/lab10.pdf lab10.pdf]
| |
| * [http://redwood.berkeley.edu/vs265/ica/ica.m ica.m]
| |
| * [http://redwood.berkeley.edu/vs265/ica/test_data.mat test_data.mat]
| |
| * [http://redwood.berkeley.edu/vs265/ica/ica2.m ica2.m]
| |
| * [http://redwood.berkeley.edu/vs265/ica/extract_patches.m extract_patches.m]
| |
| * [http://redwood.berkeley.edu/vs265/ica/showbfs.m showbfs.m]
| |
| * [http://redwood.berkeley.edu/vs265/ica/IMAGES.mat IMAGES.mat]
| |
| * [http://redwood.berkeley.edu/w/images/9/99/Lab10_soln.pdf Solution]
| |