Math 350, Fall 2016

This course explores the process of building, analyzing, and interpreting mathematical descriptions of physical processes. Topics may include feature extraction, partial differential equations, neural networks, statistical models. The course will involve some computer programming, so previous programming experience is helpful, but not required.

There is no required text for this course. Class notes will be provided.

- The first set of notes is taken from Boyce and Diprima's text on ODEs, see CLEO.
- The Text: Table of Contents and Chapters 1-3 (See below for Matlab material)
- Chapter 4 (Genetic Algorithms)
- Chapter 5 (Linear Algebra)
- Chapter 6 (The Best Basis)
- Chapter 10: Linear Neural Networks
- Chapter 12 (first part) Neural Networks

- Week 1
- Wed, Aug 31: Ch 7.1 (Boyce and Diprima on CLEO), 1, 3, 7, 8, 15, 22(*). Handouts:
- Fri, Sep 2: Nothing new was assigned. Continue working on previous assignment.

- Week 2
- Mon, Sep 5:
Modeling Question (handed out last week):
- SIR Model
- Maple worksheet in PDF format
- Maple worksheet (mw format)
- Summary and HW. For homework, turn in solutions to 4 and 5. You may use Maple for 5, below is a template file:
- Example using a System in Maple
- PDF version of the previous Maple file

- Wed, Sep 7
- Exercise Set 3 (supercedes previous handout)
- The Poincare Diagram
- Homework: Work through Set 3 exercises. Some will be collected next Wednesday (will be announced on Monday, but don't wait!).

- Fri, Sep 9
- Graphs to discuss in class
- More on the derivative (Appendix 1)
- NOTE: Selections from Chapter 9 of Boyce and Diprima are on CLEO.
- No new homework assigned, work on 2(a,b,c) and 5 from Set 3 to turn in on Wednesday.

- Mon, Sep 5:
Modeling Question (handed out last week):
- Week 3
- Mon, Sep 12: (Phase planes and the Poincare Diagram) HW is from
Section 9.1, exercises 1, 3, 7, 13, 17(*).

Here is another link to the Poincare Diagram. - Wed, Sep 14: (Local linearization) Read Appendix A,
and 9.2-9.3. HW is from Section 9.3,
Exercises 6, 8, and 20(*). For the drawings in 6 and 8, use the link
to the slope fields below.

Here is the link to Appendix A. - Fri, Sep 16: Continued from last time, and take a look at creating and analyzing three popular nonlinear models. HW: Look at exercises 1, 3 in Section 9.4 and the same problems in Section 9.5.

- Mon, Sep 12: (Phase planes and the Poincare Diagram) HW is from
Section 9.1, exercises 1, 3, 7, 13, 17(*).
- Week 4
- Mon, Sep 19. Today we finish 9.4, 9.5. For homework, finish
the problems given on Friday. There will be a handout today as
well.

Homework for Nonlinear Analysis. Be prepared to turn in 1(a) and 2 for next week.

What's due for Wednesday? Turn in the starred problems from last week (9.1, 17; 9.3, 20). - Wed, Sep 21: Starting Discrete Dynamical Systems. See Section 2.9 from Boyce and Diprima (located on CLEO). Homework today: 2.9, 1, 3, 5(*), 6, 8(*), 9, 10.
- Fri, Sep 23. Continue with Boyce and Diprima.

- Mon, Sep 19. Today we finish 9.4, 9.5. For homework, finish
the problems given on Friday. There will be a handout today as
well.
- Week 5
- Monday, Sep 26: Class Notes Here (finished discussion of discrete systems).
- Wednesday, Sep 28: Review Day
- Friday, Sep 30: Exam 1

- Week 6
- Monday, Oct 3: We're starting in on the notes for the class.
First up, we'll discuss reinforcement learning and recall some
basic facts about statistics. We're also introducing Matlab,
so the homework is a bit broken up:

Homework (about stats, Chapter 3 of the class notes): 1, 2, 4, 5-12. Turn in solutions to 5-12 (they'll go fast). Furthermore, spend an hour or two looking at Matlab in the computer lab. Take a look at Exercise Set 1 from the Matlab notes (below). - Wednesday, Oct 5: Finished the section on stats.
- Friday, Oct 7: No classes today.

- Monday, Oct 3: We're starting in on the notes for the class.
First up, we'll discuss reinforcement learning and recall some
basic facts about statistics. We're also introducing Matlab,
so the homework is a bit broken up:
- Week 7
- Monday, Oct 10: Linear regression, Matlab, start on n-armed bandit from Chapter 2. Links from today:
- Wednesday, Oct 12: Matlab, the n-armed bandit. Here is some
Matlab code discussed in the text (Chapter 2).
- banditE.m
- banditScript01.m
- (New File:) banditEplot.m This Matlab file provides a script version of "banditE" and will plot the estimates of the payouts.

- Friday, Oct 14: Continue n-armed bandit.

Homework for the n-armed bandit. Be sure to read over the Matlab code to see if you can understand what the code is doing.

- Week 8
- Monday, Oct 17: Softmax and Pursuit strategies for the
n-armed bandit. Introduction to Genetic Algorithms. Homework:
Work on the problems assigned on Friday to turn in on Wednesday.
Be sure to implement the code in Matlab. Here are some files:
- Week 8 homework
- softmax.m
- softmaxScript01.m
- softmaxScript02.m

This file is a modification of the previous one and provides a plot of the estimates of the payouts.

- Wednesday, Oct 19: Start genetic algorithms.
- Friday, Oct 21: Genetic Algorithms, continued.

- Monday, Oct 17: Softmax and Pursuit strategies for the
n-armed bandit. Introduction to Genetic Algorithms. Homework:
Work on the problems assigned on Friday to turn in on Wednesday.
Be sure to implement the code in Matlab. Here are some files:
- Week 9
- Monday, Oct 24: Finish GA, start linear algebra notes
(Chapter 5, linked at the top and below):
- Week 9 Homework Due Friday: 1, 2, 4 and 5.
- Linear Algebra notes

- Wednesday, Oct 26: Continue with the linear algebra notes. Add to HW: Page 7: 2, 3 and Page 9: 3, 4.
- Friday, Oct 28: Continue with the linear algebra notes. Add to HW: Page 9: 3, 4. Also the Matlab stuff below:

- Monday, Oct 24: Finish GA, start linear algebra notes
(Chapter 5, linked at the top and below):
- Week 10
- Monday, Oct 31: Projections
- Wednesday, Nov 2: The SVD
- Friday, Nov 4: The SVD

- Week 11
- Monday, Nov 7: Review for Exam
- Wednesday, Nov 9: Exam II
- Friday, Nov 11: Started "The Best Basis", went to p. 6

- Week 12
- Monday, Nov 14: The Best Basis
- Files for the ``eigenfaces'' homework (due Friday):
- Wednesday, Nov 16: Linear Nets
- Friday, Nov 18th: Linear Nets

- Week 13
- Monday, Nov 28: Finish Linear Nets. Homework is below, and is due on Friday (upload the published scripts to CLEO).
- Wednesday, Nov 30: Neural Networks (Text handed out on Monday)
- Friday, Dec 2: Finish up the linear network training (Iris data and Breast Cancer data). In class, we'll continue discussing the (nonlinear) feedforward neural networks.

- Week 14
- Monday, Dec 5: Backprop of error, Matlab's implemenation.
**Homework:**

- From last week: Exercises 1, 2, 4, 5 from the typed notes on Wednesday (see last week).
- Backpropagation notes (handwritten). See the last page of the notes. There is a due date on the last page, ignore it.
- Neural Network Examples in Matlab. Work through the first two examples.

- Wed, Dec 7: More on Matlab's implementation. Examples.
- Fri, Dec 9: Examples and discuss final project.

Here is the autoencoder example we discussed in class. The first line shows you how to get the wine database for Problem 2 of the final. As in class, X should be 13 x 178, and T should be 3 x 178.

- Monday, Dec 5: Backprop of error, Matlab's implemenation.

- Exam 1 Links
- Topics for Exam 1
- Review Questions (a collection of homework and homework-like questions). There are some typos noted on the solution page- (4) In the tank mixing, assume there is a pipe so that tank B is pumping brine out (outside). Figure out the gallons per minute so that tank B always has the same number of gallons. In 5(c), you can write the solution symbolically. In 16(c), change the 3 to a 2.
- Review solutions (all finished!).
- Exam 2 Links
- Exam 2 Take Home Links
- Exam 2 Take Home
- Question 1 data: Exam2Q1.mat
- Question 1 M-file: Exam2THQ1.m
- Question 2 data: Exam2Q2.mat
- Question 2 M-file: Exam2THQ2.m
- Question 3 M-file: Exam3THQ3.m
- Final Exam Links
- Matlab data: Classification01.mat
- Final Exam (Due: 8PM Thursday of Finals week)

- A Matlab Tutorial
- An addition: Solving Systems using the Slash Command
- A Quick Summary of Matlab Commands

- Plot slope fields and solutions curves for systems of DEs
- Data Analysts for Social Good is a new group forming. They are pausing on new members as they partner with Stanford.