Skip to content

Materials for a semester course on computational methods from root finding to machine learning.

License

Notifications You must be signed in to change notification settings

wdconinc/practical-computing-for-scientists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practical Computing for Scientists (PHYS 256)

Binder

An accompanying private instructor repository is available at https://github.com/wdconinc/practical-computing-for-scientists-instructor-notes.

General Information

  • Instructor: Wouter Deconinck (wdeconinck@wm.edu)
  • Class location: Small Hall 111 (MW) and 122 (F)
  • Class hours: Monday, Wednesday, Friday, 12pm-12:50pm
  • Office location: Small Hall 343D
  • Office hours: by appointment
  • Grader: Zheng Zhang (zzhang14@email.wm.edu)

Course Synopsis

This course will focus on breaking scientific problems into algorithmic pieces that can be solved using computational methods. Root finding, linear and non-linear equations, numerical modeling, optimization, random processes, graphical data presentation and fitting, scientific documentation preparation (from the catalog entry).

Objectives

The primary purpose of this course is to give you the tools you need to solve scientific problems in your future courses and after graduation. In particular you will learn how to frame a problem, break it up into algorithmic pieces, implement the solution in computer code, and evaluate the results you obtain.

Class Meetings

Each week we will have two interactive lectures (Monday and Wednesday in Small Hall 111) and one short lecture/lab (Friday in Small Hall 122). The goal of the short lecture/lab on Fridays is to let you go through programming exercises while I can help you with questions.

Blackboard

I will use blackboard only for initial announcements. This ensures that everyone who is currently enrolled in the class has access to the relevant information. Make sure you check your blackboard announcements regularly or have it setup to notify you by email.

Google Classroom

I will use Google Classroom for distribution of homework assignments, project assignments and lecture materials. The main reason is that this platform integrates well with the Google Colaboratory framework.

Google Colaboratory

In finding a suitable platform for programming exercises, I tried to balance a number of competing criteria:

  • ease of access for students,
  • ease of access for graders,
  • ability to assist students with problems,
  • ability to give feedback to students,
  • ability to track changes and improvements.

Google Colaboratory, at colab.research.google.com, fulfills the majority of these requirements. It provides a fully functional programming environment in the web browser (so no local installation is necessary). It is built upon the Google Drive framework and allows shared access to files. Access to it is included in the W&M Apps account that every student already has.

Although Google Colaboratory notebooks at first glance seem identical in operation as Google Drive documents (text documents, spreadsheets, or presentation), there is an important difference that is relevant for this class. Only the text of the notebooks is shared! The loaded libraries or values of variables are not shared among users of the same notebook. Keep this in mind when working on a notebook collaboratively.

Suggested Resources

All necessary resources for this course are available online, though not always in a single place. You will be able to complete this course without any required textbooks. Nevertheless, the following two resources may be very useful:

  • Practical Computing for Biologists, Haddock and Dunn, ISBN 9780878933914, 9781605354118
  • Numerical Methods in Engineering with Python 3, Kiusalaas, ISBN 9781107033856

The first book targets a broad range of scientists (not just biologists) and is exactly what I think should be in this course. It is not merely a programming book.

The second book introduces various numerical algorithms. It provides the connection between the algebra and calculus and the programming implementation.

While excellent references and tutorials are available online, you must keep in mind, though, that programming is most certainly not merely a matter of finding online some code that appears to do the right thing and copying it into your project. References are useful if you know what you are looking for. Tutorials require that you read more than just a single paragraph.

Python

I will not assume that you have experience in programming from scratch, but I will assume that you know how to read programs and have a basic understand of various data types, loops and conditionals. If this sounds like a high bar, don't be alarmed.

Although much of what you will learn in this class will be useful independent of programming language, practical considerations force us to make a choice. We will be using python as the programming language for this course.

Python has a few advantages:

  • Python is a general purpose programming language that is widely used in industry and at national and international research laboratories.
  • Python is free and will be available after you graduate from William & Mary.
  • Any modules and extension of python that we will use in this course are open source and allow you to dig in and figure out what is going on.
  • Python is easy to learn and use (and indeed taught in the computer science department at William & Mary).
  • Python has a large user community and very good documentation.

If you wish to brush up your python knowledge or see what we are going to start from, I encourage you to take one of the many python tutorials online (e.g. datacamp.com/courses/intro-to-python-for-data-science). We will begin with fairly basic python and throughout the semester we will naturally start using more advanced concepts in python.

Assignment Categories

For this course we will be using assignment categories developed within the Mason School of Business. Every assignment given in this course will be identified by a letter code. We may not use all categories of assignments in this course.

  • CATEGORY A: This is an individual assignment. You many not receive help from anyone on this assignment. It must be 100% your own work. All questions concerning this assignment should be addressed to your professor. It is an honor code offense to give or receive assistance on this assignment.
  • CATEGORY B: This is a group assignment. Your group may not receive help from anyone outside your group. While your group may choose to delegate the work among the group members, everyone in the group is expected to be prepared to discuss the entire assignment in class. All questions concerning this assignment should be addressed to your professor. It is an honor code offense to give help to other groups and individuals or receive assistance from other groups and individuals.
  • CATEGORY C: This is an individual assignment. You may work with others or receive help from a tutor on this assignment. You must, however, turn in your own paper. You may not divide the work with others or copy another student’s paper; it is an honor code offense to do so.
  • CATEGORY D: This is a group assignment. You may share information, discuss general concepts and approaches to the assignment with other groups. Everyone in the group should be prepared to discuss the entire assignment in class. Each group must turn in their own work. You may not copy another group’s work; it is an honor code offense to do so.
  • CATEGORY E: This is a timed assignment. You are given a specific length of time within which the work must be completed. It is an honor code offense to violate this time restriction unless you have received permission from your professor.

Honor Code

"As a member of the William and Mary community, I pledge on my honor not to lie, cheat, or steal, either in my academic or personal life. I understand that such acts violate the Honor Code and undermine the community of trust, of which we are all stewards."

Academic integrity is an integral component of the College of William and Mary learning experience and any breech of this integrity is very serious and not in keeping with the overall intellectual and ethical foundations of our University. Students are expected to adhere to the William and Mary Honor Code and to the general principles of academic honesty. These principles include and incorporate the concept of respect for the intellectual property of others, the expectation that assignments will be submitted according to guidelines specified by the instructor, and that plagiarism of any type is unacceptable.

Homework Assignments

Homework will be assigned by Thursday evening each week (at the latest) and will be due the following Wednesday at 11:59 pm. In case of holidays or breaks the homework will be assigned earlier but still be due at the same time.

All homework assignments will be category C assignments. I strongly encourage you to discuss the problems with your fellow students. However, mindless copying of solutions will not be tolerated.

You will receive homework assignment files through Google Classroom that have a personalized name. You will complete the homework assignments in those files. The instructor and grader have access to the personalized homework assignment files to be able to answer questions. Although the full edit history is stored in the files, these will only be consulted if foul play is suspected (copy & paste operations are quite obvious).

The goal of homework assignments is not for the instructor to assess you, but for you to learn the material. Therefore you are expected to (re)do the homework problems until you can correctly solve them and understand the solution completely. Your homework assignment grade will be based in equal parts on two components:

  • your good faith effort in completing the assignment to the best of your abilities by the due date,
  • your ultimate submission of a complete and correct solution.

In other words, you will receive 50% of the points for turning in a good faith effort but incorrect solution. Then you will receive the remaining 50% for turning in a correct(ed) solution.

Homework assignments are an exercise in scientific communication, in both form and content. You are expected to document your work properly, both in the code cells as well as by using documentation text blocks to provide narrative if warranted.

Group Projects

There will be three group projects that will be assigned over the course of several weeks. Group project assignments will be due at noon on Fridays. All members of all groups should be prepared to discuss their submission in that class meeting (though not every group will be asked).

All group projects will be category B assignments. Each group will solve the problem within the group alone. No interaction between the groups is allowed.

Each group project will be assigned to a randomly selected four-person or five-person team. To ensure that everyone is equally engaged in the group work, each group member will individually and confidentially submit a contribution statement that includes what you feel you contributed most to and a percentage distribution of how much you think each group member contributed overall. Naturally I expect that there will be small variations in the levels of contributions and these will not affect your grade (relax!). However, in the case of systematic and significant underperformance, there will be repercussions on your individual group project grade proportional to the level of underperformance. I am not able to reward systematic overperformance other than by writing letters of recommendation or offering you a summer research position :-)

Group projects will not necessarily have a single correct or best solution, but instead they will require you to solve a problem in an optimal way. Several groups will take different approaches; even within one group you may start different approaches to evaluate their relative merits.

Exams

There will be no midterm or final exam. The projects take the place of the midterm and final exam. During the regularly scheduled final exam time all final project teams will demonstrate their strategy and solution.

Course Schedule

The course schedule is subject to change.

Week Dates Topic Notes
1 8/29,31 Intro to Python
2 9/3,5,7 Intro to Python
3 9/10,12,14 Intro to Python
4 9/17,19,21 Optimization and fitting
5 9/24,26,28 Root finding, 1D/multi-D optimization
6 10/1,3,5 Matrices and linear algebra
7 10/8,10,12 Numerical integration
8 10/17,19 ODEs (Fall break)
9 10/22,24,26 ODEs
10 10/29,31,11/2 Monte Carlo
11 11/5,7,9 Statistics
12 11/12,14,16 Interpolation
13 11/19 Fourier transforms (Thanksgiving)
14 11/26,28,30 TBD
15 12/3,5,7 TBD

Evaluation

The total grade will be calculated from your homework grades (25%) and the three projects (25% each). Up to 5% of each project grade of 25% can be affected by the variance in peer graded group contributions.

Letter Grades

The letter grades will be according to the following table:

A- [90%,93%[ A [93%,100%]
B- [80%,83%[ B [83%,87%[ B+ [87%,90%[
C- [70%,73%[ C [73%,77%[ C+ [77%,80%[
D- [60%,63%[ D [63%,67%[ D+ [67%,70%[
F [0%,60%[

Absence

Notify the instructor in advance if you will be missing classes or will be late in submitting a homework assignment. Unexcused late homework (even by a minute) does not constitute a good faith effort and will be penalized by 50% even if it is entirely correct.

Accommodations

It is the policy of William & Mary to accommodate students with disabilities and qualifying diagnosed conditions in accordance with federal and state laws. Any student who feels he or she may need an accommodation based on the impact of a learning, psychiatric, physical or chronic health diagnosis should contact the Student Accessibility Services staff at 757-221-2509 or at sas@wm.edu. SAS staff will work with you to determine if accommodations are warranted, and if so, to help you obtain an official letter of accommodation. For more information please see Student Accessibility Services.

If you feel that there is anything that I can do to ensure a better learning environment for you, please do not hesitate to contact me. As long as these ad-hoc accommodations do not unfairly disadvantage other students, I am more than willing to help out.

Auditing

Students are welcome to audit this course (i.e. participate not for credit). Since one only learns by doing, students who audit this course are strongly encouraged to hand in homework assignments as well as midterm and final take-home exams. Although you will not be graded on them, you are expected to make a good faith effort as you would for other courses.

Open Educational Resources

As instructors (and scholars in general) we produce materials intended for sharing with others. In this spirit I invite you, the reader, to contribute corrections or additions to this material.

This material is licensed under the Creative Commons Attribution Sharealike 4.0 license. For details, see the LICENSE.md file.

About

Materials for a semester course on computational methods from root finding to machine learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published