Homework Policies and Resources

There will be six homework assignments, each due at least one week after it is handed out. Homework problems will emphasize probabilistic derivations, calculations, and reasoning. Each homework will also have a problem requiring Python implementation and analysis of some probabilistic method. We will drop your lowest homework score, and average the scores of the other five homeworks equally, to determine an overall homework score. 

Collaboration and Academic Honesty Policy

Students are encouraged to discuss and work on homework problems in groups. However, each student must write up their solutions independently, and do any required programming independently. You may not directly copy solutions or code from other students, or from materials distributed in previous versions of this or other courses. You may not make your solutions available to other students: files in your home directory may not be world-readable, and you may not post your solutions to public websites or repositories.

Academic dishonesty is unacceptable and has serious consequences at the University of California, Irvine.  It is each student's responsibility to know and follow these guidelines, as well as the UCI ICS School Policy on Academic Honesty.

Writing Python Code

In CS177 this year, we will use Python 3 for the programming portions of the homework assignments. We highly recommend installing the Anaconda Python distribution Links to an external site., which includes the full SciPy stack Links to an external site. as well as a number of other useful tools. We recommend using either the Spyder development environment Links to an external site. or Jupyter notebooks Links to an external site. for your course assignments. Both are included with Anaconda and can be launched from the Anaconda Navigator application.  If you are on a computer without Anaconda installed, you could also use a Google Colab Links to an external site. notebook, or create a Jupyter notebook on the ICS JupyterLab server (VPN required).

Spyder is designed specifically for scientific computing with Python and natively supports plotting with the MatPlotLib library.  It is an intuitive option if you are used to IDEs like MATLAB, RStudio, or Eclipse.

Jupyter notebooks provide an alternative way to organize all required parts of your homework solutions.  A single notebook can include text, mathematical equations in LaTeX, figures, Python code, and the output of executing that code.  However, it may take a bit of extra work to understand how to setup and use Jupyter notebooks. In addition, you will need to extract the contents of your notebook to create the PDF and code homework submissions.

Formatting and Submitting Homework Answers

There are two separate Gradescope Links to an external site. assignments for each homework, both due at the same time.  For the first assignment, submit a PDF containing your answers for all questions.  For the second assignment, submit your Python code for the last question for autograding.

Be sure that your PDF submission for the first assignment is formatted as follows:

  • You must fill in your answers on the PDF template released with the homework equations. All pages must remain in their original order when uploading your assignment to gradescope. Do not rearrange, add, or remove any pages from the provided PDF template.
  • For multiple-choice questions, ensure that you completely fill in the bubble next to your selected answer, and provide an explanation or justification to support your answer.
  • Enter your final answers in the designated boxes, and write your explanations and/or math justifications in the space provided below each question.  Always show the work needed to produce your answers, not just the final result. Math may be handwritten, but if possible, please enter explanatory sentences as typed text. 
  • For question 4, use the provided Python file. After adding your code to the template, submit that file separately to the second Gradescope assignment. In addition to uploading your Python code, be sure you provide answers and explanations in the designated areas of the PDF. Do not include code for question 4 in the PDF.
  • If you need to include code to show your work for any part of questions 1-3, you may insert an image showing the relevant code in the PDF. If any question asks you to create a plot, insert an image showing the plot in the PDF.
  • Check that your answers (especially scanned math) are readable within Gradescope, and that content has not been cut-off by the page margins.  We cannot grade what we cannot see, and may deduct points for illegible answers.

We recommend using a pdf annotation program to fill in the PDF template; there are many of these available for Mac, Windows, and tablets.  Or alternatively, you could print the template, (neatly) handwrite your answers, and then scan your final answers for PDF submission.

Submitting Python Code

For the coding components of the final question, modify the Python template file distributed with each homework. After adding your code to the template, submit that file separately to the second Gradescope assignment. In addition to uploading your Python code, be sure you provide numeric answers and explanations in the designated areas of the PDF.

Here are some requirements to be aware of as you submit your code:

  • Make sure you submit only one .py file, whose name is unchanged from the template.  For example, submit only geyser.py for Homework 1.
  • If you import any data files, make sure paths are relative instead of absolute.  For example, don't import "/home/eriksudderth/hw1/geyser.npy" because that path won't exist on the autograder. Instead, import "geyser.npy".
  • Make sure your code runs in native Python, outside of Jupyter.  For example, including "%matplotlib inline" will cause errors in a .py script.
  • Make sure you don't import any unnecessary packages, as the autograder might not have them installed. The autograder will always have access to numpy, scipy, matplotlib, native Python packages like math, and anything imported in the template file.
  • Make sure you do not change the input/output signature of functions from what's in the template.
  • When you are instructed to write a function, make sure everything used inside the function is either passed in as a parameter or computed inside the function. If you compute a value outside, it might raise exceptions or give incorrect values when we test on different inputs. 
  • Do not worry about print statements or matplotlib calls inside of your code. It will not cause errors in the autograder.

Upon submission, you'll be told if the autograder ran successfully. A brief error message will be shown if you failed. For example, "no module geyser" means you did not upload a single file named geyser.py, so your code can't be found.

Late Submission Policy

Homework assignments are due by 11:59pm on the announced date. Your answers may be submitted up to 5 days late (by 11:59pm); after this point, solutions will be distributed and handins will no longer be accepted. We do not deduct points for submissions that are (less than 5 days) late.  But to encourage you to keep up with the material presented in lecture, for each homework that is submitted on time, you will receive 1 bonus point (out of a maximum of 100) on the score of the next exam.

Exceptions to this policy are only given in very unusual circumstances, such as documented family or medical emergencies, and any extensions must be requested in advance by e-mail to the instructor.

Homework Grading

Homework grades will be distributed electronically via gradescope, with a rubric indicating why points were deducted.  If you would like to dispute the points you received for some assignment, do so by using the regrade request function on gradescope.  We will only allow regrade requests for one week after the date that grades are returned.

Resolving regrade requests may require discussion among the course staff, so please be patient. Certainly do tell us about cases where a correct answer was missed or given only partial credit. If your answer is partly correct and you received partial credit, we are unlikely to change the amount of partial credit.

We will only consider regrade requests submitted via gradescope, and the course staff will not discuss homework grading during office hours. If you have significant concerns about your overall course standing, please arrange an individual meeting with the instructor.