PS1

Welcome to the first real homework assignment in CS 320! This homework assignment has 3 parts: linear regression, polynomial regression, and K-nearest neighbors.

Assignment logistics

This is a partner assignment, which means you should complete all pieces of the homework with your assigned partner. (Note that this means you should complete the assignment together. You should not divide-and-conquer.)

Collaboration and academic honesty

You can talk to others in the class about general problem solving strategies, but you should not share code, writing, or specific insights with people other than your partner. The standard class academic honesty policies apply (see the syllabus for more details, but the tldr is that you can freely use (with citation) documentation or materials on Moodle, you can use other static online material with caution, and you cannot use generative AI.) As always, reach out to Anna with and questions about collaboration or AI usage.

Setup

Download the starter files here. Open the folder in VSCode and select the cs320 Python kernel that you created. Then, complete the exercises in each of the notebooks. If you need help remembering how to complete any of these setup steps, refer back to Part 3 of ps0.

Part 1: Linear regression (ps1_part1_linear.ipynb)

Part 2: Polynomial regression (ps1_part2_polynomial.ipynb)

Part 3: KNN (ps1_part3_knn.ipynb)

Handing in the assignment

To prepare your submission, open the notebook collect_submission.ipynb in VSCode and follow the instructions there.

Grading

Each notebook in this homework will be weighted equally. Each sub-problem will be graded out of 4 points, where 4 indicates mastery, 3 proficency, 2 significant progress, and 1 minimal progress. Your grade for each notebook will be the average of your score on each of its subparts. See Moodle for more details on homework grading.

Tips

  • Make sure to save your work, especially in .py files and also in the .ipynb file!
  • If your kernel is disconnected (e.g., if you take a break from working), you will need to re-run all previous cells
  • Please make sure you've run each notebook, in order, before submitting. I should be able to see all of the cell outputs, and if I rerun the whole notebook, I should see exactly the same cell outputs as what you submit.