Bayesian Data Analysis

PHY/CSI/INF 451/551 451Y
(5048,5049,5391,5450,5050,5051)
Fall 2020
Format: Hybrid (Tuesday: Online [Zoom], Thursday: LC 21)
Lecture: Tue/Thu 1:30 PM - 2:50 PM
Check Syllabus and News before coming to class

Prof. Kevin H. Knuth
Physics Department
University at Albany
Albany NY USA
 

News

The last HW set is available for download HW678.
HWs 6 and 7 are extra credit.
HW8 is required. They are due on Dec 3.

MidTerm Solutions
Download the MidTerm solutions HERE.

Zoom Lecture Passwords
Below, some of the later recorded Zoom Lectures will require passwords.
Here is a list of those passwords:
Nov 10: eqA+=y#3
Nov 12: S=^h?5wC
Nov 17: 23p&5@Mx
Nov 19/20: UjTV^kn0
Nov 24: H7h7cCy+


Here is working Movie Classification Code. There was a bug in the getFeatureVECTOR.m function where the for-loop on line 15 went from 3 to 4, should have been:
for i = 3:size(data,2)
This is now fixed. In addition, I used a function (see the cell definitions in the excel file) to assign whether the user had seen the film so that Action, Fantasy, and SciFi films were favored. Careful application helped to better balance the training data.
Together, these changes helped. The algorithm is now about 88% correct.


You may attend ANY class ONLINE!
Just log into the Zoom address for our class that you were emailed.

Safety

COVID-19 is still a threat
Students are expected to:

Please refer to UAlbany Health and Safety for more information.

Overwhelmed?
Are you overwhelmed by class or things beyond class?
Might you need some sort of help/counseling?
Please don't ignore this!

  • If you think it's an emergency, call 911, or go to this link (http://www.albany.edu/counseling_center/emergency.shtml).
  • If you think it is serious, but not an emergency you should get in touch with University Counseling and Psychological Services (http://www.albany.edu/counseling_center/index.shtml ). They're very good, and they're absolutely confidential.
  • If you think you might need help/support and it's not too serious, send me an email at kknuth@albany.edu and I will find a time to meet. If you find it easier to contact one of the TAs first, then please do so. We are here to help you succeed!

Website

You should check our class website for updates to the schedule, location or for special announcements. http://knuthlab.org/courses/2020/BayesianDataAnalysis/pmwiki.php

Zoom

Both Tuesday and Thursday lectures will be synchronously cast online using Zoom. This means that you can choose to attend the class remotely at any time.

The meeting login information is the same for both days and all classes. This information should have been emailed to you at the beginning of the semester. Please contact the professor to have that information re-sent.

To join the meeting. Go to the University's Zoom page and sign in. Then you can join the meeting.

Contact

To reach the instructor, please send an email to

 Prof. Kevin Knuth(kknuth@albany.edu)
 Office Hours Online [Zoom]Fri 1:30 - 2:30pm


TA's can be reached at their email addresses:

 Risinie Perera(rperera@albany.edu )
 Office Hours Online [Zoom]Mon 1:30 - 2:30pm
   
 Lindsey Decker(ladecker@albany.edu )
 Office Hours Online [Zoom]Wed 11am - 12pm



Zoom login information for the Instructor and TAs were emailed to registered students at the beginning of the semester. Please email Prof. Knuth to have the Zoom login information re-sent.

ALL HOMEWORK is to be submitted by email to knuthclass@gmail.com

Schedule

Links in the Where column go to the recorded lecture.
Links in the Topic column go to the slides for that lecture.

WeekDateWhereTopicResourcesHW
1Aug 25ZoomIntroduction [ppt]Ch. 1, J80 
 Aug 26LC 21Problem Solving [ppt]  
2Sep 1ZoomProblem Solving [ppt]  
 Sep 3LC 21Matlab Overview HW1p:Sep 15
3Sep 8ZoomFoundations( W60),K15 
 Sep 10LC 21Probability TheoryC46, KS12HW2w:Sep 22
4Sep 15ZoomBayes ExamplesCh. 2HW3p:Oct 6
 Sep 17ZoomBayes ExamplesCh. 3HW4w:Oct 1
5Sep 22ZoomPDFs and Moments  
 Sep 24LC 21UncertaintyChs. 4 & 5 
6Sep 29ZoomUncertainty  
 Oct 1LC 21Probability & EntropyJ68 Gif07 S49 
7Oct 6ZoomEx: Length of a PenB18 
 Oct 8ZoomEx: Histogram BinningK19 
8Oct 13ZoomMultiple Dimensions HW5w:Oct 21
 Oct 15ZoomOptimization  
9Oct 20ZoomEx: ClassificationBerrar 
 Oct 22LC 21Intro to Midterm  
 Oct 22 MIDTERM due Oct 27
10Oct 27ZoomClassification contMovie Classification Code 
 Oct 29ZoomSampling and MCMC  
11Nov 3ZoomMetropolis-Hastingsmcmc code 
 Nov 5ZoomModel TestingKetal15, Ch. 4 
12Nov 10ZoomNested SamplingCh. 9, code 
 Nov 12ZoomNested SamplingNS demo code, S08HW6,7,8:Dec 3
 Nov 15 ABSTRACT DUE
13Nov 17ZoomEx: Exoplanet DetectionK17 
 Nov 20ZoomExperimental DesignK03 KC08 
14Nov 24ZoomDiscussion  
 Dec 4ZoomProject Presentations1pm - 3pm
 Dec 7 Project Reports Due

Syllabus

Course: APHY 451, APHY 451Y, APHY 551, ICSI 451, ICSI 551, CINF 451, CINF 551
Class Nos.: 5048, 5049, 5391, 5450, 5050, 5051
Format: Hybrid (Tuesday: Online [Zoom], Thursday: LC 21)
Instructor: Prof. Kevin H. Knuth, Associate Professor of Physics
Contact: kknuth@albany.edu, PH 211
Office Hours: Online [Zoom] Fri 1:30 - 2:30pm
TAs: Risinie Pereira (Physics), rperera@albany.edu
  Lindsay Decker (Computer Science), ladecker@albany.edu
Required Text: Data Analysis: A Bayesian Tutorial by Sivia and Skilling, 2nd Edition
Required License: MatLab Release 14 or Later: Student Edition

Additional Text (Recommended for those in the Physical Sciences):
Bayesian Probability Theory: Applications in the Physical Sciences


Course Description
Introduction to both the principles and practice of Bayesian and maximum entropy methods for data analysis, signal processing, and machine learning. This is a hands-on course that will introduce the use of the MATLAB computing language for software development. Students will learn to write their own Bayesian computer programs to solve problems relevant to physics, chemistry, biology, earth science, and signal processing, as well as hypothesis testing and error analysis. Optimization techniques to be covered include gradient ascent, fixed-point methods, and Markov chain Monte Carlo sampling techniques.
3 credits
Prerequisite(s): MAT 214 (or equivalent) and CSI 101, CSI 201, or equivalent


Course Objectives
Learn how to use the sum and product rules of probability to compute probabilities of various hypotheses. Learn how to use Bayes theorem to solve inference-based data analysis problems. Learn how to assign prior probabilities and likelihood functions based on the problem at hand. Learn both analytic and numerical techniques for computing the mean and mode of a probability density function as well as the accompanying uncertainties and the Bayesian evidence.
PHY 451Y has the additional objective of focusing on presentations of scientific work. PHY 451Y students will be expected to present their programming homework results to the class. PHY 451Y students are required to complete and present final projects (see below).

Lectures
Tuesday classes will be conducted ONLINE using Zoom. The Zoom address will be emailed to registered students before classes begin. Please email the instructor if you need the Zoom login information.
Thursday classes will be conducted in person in LC 21.


Expectations
It is expected that each student will either attend the Lectures and/or watch their recordings, submit homework in a timely manner, and perform their own work on take-home exams.


Attendance
I will be taking attendance in this class (both in-person and online). Students with better than 80% attendance will have their letter grade increased to the next grade (with two exceptions). For example, a C+ would be upgraded to a B-, a B- would be upgraded to a B. However, an A being the maximum letter grade would have to remain an A. Similarly, an E will stay an E.


Incomplete Grades, Make-Ups
It is expected that each student will submit homework in a timely manner, and perform their own work on homework and take-home exams. Homework submitted more than 7 days after the due date will be assigned a 0, unless the student makes arrangements beforehand. The Mid-term Exam will be a take home exam. Late exams will not be accepted. Please plan accordingly.


Academic Integrity
Each student is to perform his or her own work. COPYING IS STRICTLY PROHIBITED. Submitting the work of another person as your own is plagiarism and will be treated seriously by assigning an E for the course. Please consult the university's standards on Academic Integrity.


Written Homework
Written homework assignments will be assigned approximately weekly. Typically, the solutions will be due 7 days after being assigned. All written homework assignments are expected to be completed and written in a neat and professional manner.

Each Written Homework assignment can be emailed by the end of the day 11:59 pm of the Submission Date above for 100 points. An assignment can be turned in from 1-3 days after the Submission Date for 90 points. An assignment can be turned in from 4-7 days after the Submission Date for 75 points. Assignments turned in more than 7 days after the Submission Date will receive 0 points.

The Written HW assignment with the lowest score will be dropped.
This allows you to miss one Written HW assignment, if you wish.

ALL homework is to be submitted to knuthclass@gmail.com


Programming Homework
Programming homework will be assigned. Programs are to be written as Matlab m-file functions. In many cases, the instructor will provide the data to be analyzed, and the student is expected to turn in a computer-generated solution along with a zip file containing the software. The instructor should be able to open the zip file, run the software successfully on his own machine, and obtain identical results. Any results must be written up and presented as an MS-Word or PDF-formatted report with appropriate explanation.

PHY 451Y students will present their programming HW solutions to the class.

Each Programming Homework assignment can be turned in by the end of the day 11:59 pm of the Submission Date above for 100 points. An assignment can be turned in from 1-3 days after the Submission Date for 90 points. An assignment can be turned in from 4-7 days after the Submission Date for 75 points. Assignments turned in more than 7 days after the Submission Date will receive 0 points.

The Programming HW assignment with the lowest score will be dropped.
This allows you to miss one Programming HW assignment, if you wish.

ALL homework is to be submitted to knuthclass@gmail.com


Exams
There will be a Midterm Exam only.
It will be take-home exam administered on a Thursday to be completed over the weekend.

ExamStart DateDue Date
MidTerm ExamOct 22Oct 27 at 11:59 pm

There will be NO FINAL EXAM. Instead we will have online (Zoom) student presentations on Final Research Projects on Dec 4 from 1 - 3pm. Attendance mandatory for everyone.


Student Projects
Final Projects are required for both Graduate Students and PHY 451Y students. Students can choose to work individually or in groups of two to propose, perform, and present a final project for the course. This project will be a project that uses methods taught in this course to solve a data analysis or signal processing problem. Project Proposals in the form of an Abstract are due on Nov 15.
Project Reports follow the format of a short 4-8 page research paper including an abstract, introduction, method, results, conclusion, and references, along with the submission of a zip file containing the data and code.
Project Presentations [Zoom] will be on Dec 4 from 1pm - 3pm
Project Reports are due on Dec 7.


Undergraduate Grading
Undergraduates are graded using Option I, below.
Undergraduates who do a Final Project will be assigned the best grade of Option I or II.

Option I   Option II 
Written HW40%  Written HW30%
Programming HW40%  Programming HW30%
Exams20%  Exams15%
    Final Project25%

Graduate Grading

Written HW30%
Programming HW30%
Exams15%
Final Project25%
LetterPercentGPA
A90 - 1004.0
A-87 - 903.7
B+83 - 873.3
B80 - 833.0
B-77 - 802.7
C+73 - 772.3
C70 - 732.0
C-67 - 701.7
D+63 - 671.3
D60 - 631.0
E/F< 600.0