Difference between revisions of "VS265: Homework assignments Fall2010"

From RedwoodCenter
Jump to navigationJump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Students are encouraged to work in groups, but turn in assignments ''individually'', listing the group members they worked with.
 
Students are encouraged to work in groups, but turn in assignments ''individually'', listing the group members they worked with.
 +
 +
'''Submission instructions''':
 +
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)
 +
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 ==  
Line 23: Line 29:
 
   In [2]: d = np.load('data.npz')
 
   In [2]: d = np.load('data.npz')
 
   In [3]: X,O = d['X'],d['O']
 
   In [3]: X,O = d['X'],d['O']
 +
 +
* Solutions: [http://redwood.berkeley.edu/vs265/soln1-2010.pdf pdf] [http://redwood.berkeley.edu/vs265/lab1.txt lab1.py] [http://redwood.berkeley.edu/vs265/lab1-08.m lab1.m (from '08)]
  
 
==== Lab #2, due Tuesday, Sep 21 at beginning of class ====
 
==== Lab #2, due Tuesday, Sep 21 at beginning of class ====
* [http://redwood.berkeley.edu/vs265/lab2-08.pdf lab2.pdf]
+
* [http://redwood.berkeley.edu/vs265/lab2-10.pdf lab2.pdf]
 
* [http://redwood.berkeley.edu/vs265/apples.mat apples.mat]
 
* [http://redwood.berkeley.edu/vs265/apples.mat apples.mat]
 
* [http://redwood.berkeley.edu/vs265/oranges.mat oranges.mat]
 
* [http://redwood.berkeley.edu/vs265/oranges.mat oranges.mat]
* [http://redwood.berkeley.edu/vs265/lab2s.m lab2s.m]
+
* [http://redwood.berkeley.edu/vs265/lab2s.m lab2s.m] or [http://redwood.berkeley.edu/vs265/lab2s.txt lab2s.py]
 
* [http://redwood.berkeley.edu/vs265/apples2.mat apples2.mat]
 
* [http://redwood.berkeley.edu/vs265/apples2.mat apples2.mat]
 
* [http://redwood.berkeley.edu/vs265/oranges2.mat oranges2.mat]
 
* [http://redwood.berkeley.edu/vs265/oranges2.mat oranges2.mat]
 
* [http://redwood.berkeley.edu/vs265/lab2m.m lab2m.m]
 
* [http://redwood.berkeley.edu/vs265/lab2m.m lab2m.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']
 +
 
<!--* Solutions: [http://redwood.berkeley.edu/amir/vs298/soln2-08.pdf pdf] [http://redwood.berkeley.edu/amir/vs298/soln2.zip zip'd Matlab code]-->
 
<!--* Solutions: [http://redwood.berkeley.edu/amir/vs298/soln2-08.pdf pdf] [http://redwood.berkeley.edu/amir/vs298/soln2.zip zip'd Matlab code]-->
 +
 +
==== Lab #3, due Tuesday, September 28 at beginning of class ====
 +
* [http://redwood.berkeley.edu/vs265/lab3.pdf lab3-08.pdf]
 +
Matlab code are as separate files below.
 +
* [http://redwood.berkeley.edu/vs265/lab3/data2d.mat data2d.mat]
 +
* [http://redwood.berkeley.edu/vs265/lab3/faces2.mat faces2.mat]
 +
* [http://redwood.berkeley.edu/vs265/lab3/hebb.m hebb.m]
 +
* [http://redwood.berkeley.edu/vs265/lab3/eigmovie.m eigmovie.m]
 +
<!--* Solutions: [http://redwood.berkeley.edu/amir/vs298/hw3-08.pdf pdf] [http://redwood.berkeley.edu/amir/vs298/hw3-08.zip zip'd Matlab code]. For self-grading, each question is worth 3 points.-->

Revision as of 22:13, 21 September 2010

Students are encouraged to work in groups, but turn in assignments individually, listing the group members they worked with.

Submission instructions: 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)

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

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/"

Python

Fernando Perez at the Brain Imaging Center has an excellent set of resources on Python for scientific computing. You will likely find the "Starter Kit" particularly useful.

Additionally, Josh Bloom (Astronomy) is teaching a Science Research Computing with Python course this semester (on Mondays 2-5pm in Hearst 310, Fall 2010, CCN 06180) which you might want to take. A Python Boot Camp kicked-off that class, and has a lot of accessible introductory material.

Assignments

Lab #1, due Thursday, September 9th at beginning of class

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 data.npz

  In [1]: import numpy as np
  In [2]: d = np.load('data.npz')
  In [3]: X,O = d['X'],d['O']

Lab #2, due Tuesday, Sep 21 at beginning of class

For Python you can use 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']


Lab #3, due Tuesday, September 28 at beginning of class

Matlab code are as separate files below.