Term 2 Winter 2020: 11 Jan 11 - 24 Feb (no class on 2/15 or 2/17)

Course info

Daniel J. McDonald
Office: Earth Sciences Building 3106

Office hours:
Mon 15:00 - 16:00 as necessary
I’m happy to arrange additional time. Just message me on Slack.

Course webpage:
Github Org:

Mon/Wed 13:30 - 15:00 UTC-7 Vancouver local time on Zoom (link in Canvas)

Convex Optimization, Boyd and Vandenberghe, 2004, Cambridge University Press.

STAT 560, 561, and 547c (lightly enforced)

Course content

This course focuses on algorithms for solving convex optimization problems and the implications for statistical estimation.

Necessary background:

linear algebra (vectors, matrices, inverse, eigenvalues/decompositions, positive (semi)definiteness)
multivariable calculus (gradient, hessian)
undergraduate statistics (basic estimation and inference, linear regression, probability theory)
R/Python (loops and flow control, functions)


  1. convex sets and functions
  2. canonical problems
  3. first order numeric optimization
  4. Duality and KKT conditions
  5. Glimpse of 0th/2nd order methods
  6. Coordinate descent, ADMM
  7. Path algorithms and regularized statistical models

Lectures and homeworks will focus on both mathematical understanding and coding techniques.

Course assessment opportunities

In-class activities, max 20 points
Little quiz, 10 points
2 Homework assignments, 30 points total
Project, 35 points (+ 5 bonus in rare cases) Professionalism, +/- 5 points

The maximum score is 95 unless you achieve the bonus or display excellent professionalism. Excellent professionalism means going above and beyond in terms of in-class participation and contributions on the discussion board. Regularly responding to fellow students is a step toward the bonus. Bonus points are rare and will be reserved for excellence. Most students will receive a 0 for their processionalism score. Failing to participate in class, regularly skipping class, leaving your project team out to dry, will result in reduced scores. This should also be rare.

Lectures and In-class activites

Lectures will be live on Zoom (see Canvas for the link). Each period will consist of ~50 minutes of lecture and ~30 minutes of group activities (in random break out rooms). Group activities are intended to help you learn through discussion and also to give you a chance to interact with other students. Each group activity will be worth 1-4 points. You can accumulate up to 20 points for completing these.

Little quiz

On February 22 (at the beginning of class) there will be an (individual) little quiz. It will be entirely multiple choice and T/F. You will have 30 minutes to take it.

Homework assignments

There will be 2 individual homework assignments. The first is due at the end of the 3rd week (January 31 23:59 ) and the second is due at the end of the 5th week (February 12). Each is worth 15 points. You will have up to 1 week to complete any requested revisions. Initial submissions will receive 0/5/10/15 points with revisions allowing you to get back 80% of missed credit. Late submissions will receive score * .8^n where n is the number of days late unless I am notified in advance of the due date and approve the reason for the delay. Revisions after 1 week will receive no credit.

Discussing assignments with your classmates is allowed and encouraged, but it is important that every student get practice working on these problems. This means that all the work you turn in must be your own. The general policy on homework collaboration is:

  1. You must first make a serious effort to solve the problem.
  2. If you are stuck after doing so, you may ask for help from another student. You may discuss strategies to solve the problem, but you may not look at their code, nor may they spell out the solution to you step-by-step.
  3. Once you have gotten help, you must write your own solution individually. You must disclose, in your GitHub pull request, the names of anyone from whom you got help.
  4. This also applies in reverse: if someone approaches you for help, you must not provide it unless they have already attempted to solve the problem, and you may not share your code or spell out the solution step-by-step.

These rules also apply to getting help from other people such as friends not in the course (try the problem first, discuss strategies, not step-by-step solutions, acknowledge those from whom you received help).

You may not use homework help websites, Stack Overflow, and so on under any circumstances.

You can always, of course, ask me for help on Slack. And public Slack questions are allowed and encouraged.

You may also use external sources (books, websites, papers, …) to

But external sources must be used to support your solution, not to obtain your solution. You may not use them to

If you use code from online or other sources, you must include code comments identifying the source. It must be clear what code you wrote and what code is from other sources. This rule also applies to text, images, and any other material you submit.

Please talk to me if you have any questions about this policy. Any form of plagiarism or cheating will result in sanctions to be determined by me, including grade penalties (such as negative points for the assignment or reductions in letter grade) or course failure. I am obliged to report violations to the appropriate University authorities. See also the text below.

Group/individual project

There will be a project. You may choose to complete it in a group of your choosing or individually. The group can contain at most 4 individuals. The group project will have 2 checkpoints on 22 January and 24 February with a short presentation on 24 February.

Similar policies on plagiarism as for the homework apply.

Important considerations

University policies

UBC provides resources to support student learning and to maintain healthy lifestyles but recognizes that sometimes crises arise and so there are additional resources to access including those for survivors of sexual violence. UBC values respect for the person and ideas of all members of the academic community. Harassment and discrimination are not tolerated nor is suppression of academic freedom. UBC provides appropriate accommodation for students with disabilities and for religious, spiritual and cultural observances. UBC values academic honesty and students are expected to acknowledge the ideas generated by others and to uphold the highest academic standards in all of their actions. Details of the policies and how to access support are available here.

Academic honesty and standards

UBC Vancouver Statement

Academic honesty is essential to the continued functioning of the University of British Columbia as an institution of higher learning and research. All UBC students are expected to behave as honest and responsible members of an academic community. Breach of those expectations or failure to follow the appropriate policies, principles, rules, and guidelines of the University with respect to academic honesty may result in disciplinary action.

For the full statement, please see the 2020/21 Vancouver Academic Calendar

Course specific

Several commercial services have approached students regarding selling class notes/study guides to their classmates. Please be advised that selling a faculty member’s notes/study guides individually or on behalf of one of these services using UBC email or Canvas, violates both UBC information technology and UBC intellectual property policy. Selling the faculty member’s notes/study guides to fellow students in this course is not permitted. Violations of this policy will be considered violations of UBC Academic Honesty and Standards and will be reported to the Dean of Science as a violation of course rules. Sanctions for academic misconduct may include a failing grade on the assignment for which the notes/study guides are being sold, a reduction in your final course grade, a failing grade in the course, among other possibilities. Similarly, contracting with any service that results in an individual other than the enrolled student providing assistance on quizzes or exams or posing as an enrolled student is considered a violation of UBC’s academic honesty standards.

Some of the problems that are assigned are similar or identical to those assigned in previous years by me or other instructors for this or other courses. Using proofs or code from anywhere other than the textbooks (with attribution), this year’s course notes (with attribution), or the course website is not only considered cheating (as described above), it is easily detectable cheating. Such behavior is strictly forbidden.

Academic Concessions

These are handled according to UBC policy. Please see


During this pandemic, the shift to online learning has greatly altered teaching and studying at UBC, including changes to health and safety considerations. Keep in mind that some UBC courses might cover topics that are censored or considered illegal by non-Canadian governments. This may include, but is not limited to, human rights, representative government, defamation, obscenity, gender or sexuality, and historical or current geopolitical controversies. If you are a student living abroad, you will be subject to the laws of your local jurisdiction, and your local authorities might limit your access to course material or take punitive action against you. UBC is strongly committed to academic freedom, but has no control over foreign authorities (please visit this link for an articulation of the values of the University conveyed in the Senate Statement on Academic Freedom). Thus, we recognize that students will have legitimate reason to exercise caution in studying certain subjects. If you have concerns regarding your personal situation, consider postponing taking a course with manifest risks, until you are back on campus or reach out to your academic advisor to find substitute courses. For further information and support, please visit this link.

Take care of yourself

Course work at this level can be intense, and I encourage you to take care of yourself. Do your best to maintain a healthy lifestyle this semester by eating well, exercising, avoiding drugs and alcohol, getting enough sleep and taking some time to relax. This will help you achieve your goals and cope with stress. I struggle with these issues too, and I try hard to set aside time for things that make me happy (cooking, playing/listening to music, exercise, going for walks).

All of us benefit from support during times of struggle. If you are having any problems or concerns, do not hesitate to speak with me. There are also many resources available on campus that can provide help and support. Asking for support sooner rather than later is almost always a good idea.

If you or anyone you know experiences any academic stress, difficult life events, or feelings like anxiety or depression, I strongly encourage you to seek support. UBC Counseling Services is here to help: call 604 822 3811 or visit their website. Consider also reaching out to a friend, faculty member, or family member you trust to help get you the support you need.

A dated PDF is available at this link.