Skip to content

Commit efd342c

Browse files
committed
init 2025 assignment1 from 2024
1 parent cfbe18c commit efd342c

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

assignments/2025/assignment1.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
layout: page
3+
title: Assignment 1
4+
mathjax: true
5+
permalink: /assignments2024/assignment1/
6+
---
7+
8+
<span style="color:red">This assignment is due on **Friday, April 19 2024** at 11:59pm PST.</span>
9+
10+
Starter code containing Colab notebooks can be [downloaded here]({{site.hw_1_colab}}).
11+
12+
- [Setup](#setup)
13+
- [Goals](#goals)
14+
- [Q1: k-Nearest Neighbor classifier](#q1-k-nearest-neighbor-classifier)
15+
- [Q2: Training a Support Vector Machine](#q2-training-a-support-vector-machine)
16+
- [Q3: Implement a Softmax classifier](#q3-implement-a-softmax-classifier)
17+
- [Q4: Two-Layer Neural Network](#q4-two-layer-neural-network)
18+
- [Q5: Higher Level Representations: Image Features](#q5-higher-level-representations-image-features)
19+
- [Submitting your work](#submitting-your-work)
20+
21+
### Setup
22+
23+
Please familiarize yourself with the recommended workflow by watching the Colab walkthrough tutorial below:
24+
25+
<iframe style="display: block; margin: auto;" width="560" height="315" src="https://www.youtube.com/embed/DsGd2e9JNH4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
26+
27+
**Note**. Ensure you are periodically saving your notebook (`File -> Save`) so that you don't lose your progress if you step away from the assignment and the Colab VM disconnects.
28+
29+
Once you have completed all Colab notebooks **except `collect_submission.ipynb`**, proceed to the [submission instructions](#submitting-your-work).
30+
31+
### Goals
32+
33+
In this assignment you will practice putting together a simple image classification pipeline based on the k-Nearest Neighbor or the SVM/Softmax classifier. The goals of this assignment are as follows:
34+
35+
- Understand the basic **Image Classification pipeline** and the data-driven approach (train/predict stages).
36+
- Understand the train/val/test **splits** and the use of validation data for **hyperparameter tuning**.
37+
- Develop proficiency in writing efficient **vectorized** code with numpy.
38+
- Implement and apply a k-Nearest Neighbor (**kNN**) classifier.
39+
- Implement and apply a Multiclass Support Vector Machine (**SVM**) classifier.
40+
- Implement and apply a **Softmax** classifier.
41+
- Implement and apply a **Two layer neural network** classifier.
42+
- Understand the differences and tradeoffs between these classifiers.
43+
- Get a basic understanding of performance improvements from using **higher-level representations** as opposed to raw pixels, e.g. color histograms, Histogram of Oriented Gradient (HOG) features, etc.
44+
45+
### Q1: k-Nearest Neighbor classifier
46+
47+
The notebook **knn.ipynb** will walk you through implementing the kNN classifier.
48+
49+
### Q2: Training a Support Vector Machine
50+
51+
The notebook **svm.ipynb** will walk you through implementing the SVM classifier.
52+
53+
### Q3: Implement a Softmax classifier
54+
55+
The notebook **softmax.ipynb** will walk you through implementing the Softmax classifier.
56+
57+
### Q4: Two-Layer Neural Network
58+
59+
The notebook **two\_layer\_net.ipynb** will walk you through the implementation of a two-layer neural network classifier.
60+
61+
### Q5: Higher Level Representations: Image Features
62+
63+
The notebook **features.ipynb** will examine the improvements gained by using higher-level representations
64+
as opposed to using raw pixel values.
65+
66+
### Submitting your work
67+
68+
**Important**. Please make sure that the submitted notebooks have been run and the cell outputs are visible.
69+
70+
Once you have completed all notebooks and filled out the necessary code, you need to follow the below instructions to submit your work:
71+
72+
**1.** Open `collect_submission.ipynb` in Colab and execute the notebook cells.
73+
74+
This notebook/script will:
75+
76+
* Generate a zip file of your code (`.py` and `.ipynb`) called `a1_code_submission.zip`.
77+
* Convert all notebooks into a single PDF file.
78+
79+
If your submission for this step was successful, you should see the following display message:
80+
81+
`### Done! Please submit a1_code_submission.zip and a1_inline_submission.pdf to Gradescope. ###`
82+
83+
**2.** Submit the PDF and the zip file to [Gradescope](https://www.gradescope.com/courses/527613).
84+
85+
Remember to download `a1_code_submission.zip` and `a1_inline_submission.pdf` locally before submitting to Gradescope.

0 commit comments

Comments
 (0)