Young Wu's Homepage


Prev: W5 ; Next: W7

Lecture Note

* Slides
Lecture 11: Slides, With Quiz
Lecture 12: Slides, With Quiz
Annotated Lecture 11 Section 1: Slides
Annotated Lecture 12 Section 1: Slides
Annotated Week 6 Section 2: Part I, Part II

* Websites
Image Segmentation: Link 1, Link 2
K Means Clustering: Link
K Gaussian Mixture: Link
Tree of Life: Link 1, Link 2
Generative Adversarial Net: Link
Principal Component: Link 1, Link 2
Eigen Face: Link 1, Link 2
t-distributed Stochastic Neighbor Embedding: Link
Swiss Roll: Link
tSNE Demmo: Link
PCA Proofs from Professor Jerry Zhu's 540 notes: PDF File

* YouTube Videos
What is the relationship between Naive Bayes and Logistic Regression? Link
What is the relationship between K Means and Gradient Descent? Link

Written (Math) Problems

Submit on Canvas: PDF

Programming Problem

* Short Instruction
(1) Download one set of drawings from Quick Draw.  Download the category according to your wisc ID:
Type in your ID:
Download ONE of the following categories:
Download the simplified drawings files (.ndjson) or the binary files (.bin) from Link. Extract the first 1000 images and normalize so that they have the same length. You can use more images.
(2) Use K-means clustering to group the images into groups labelled 1, 2, ..., K. K should be between 5 and 10.

Quick
* Files to submit
(1) mean_1.png, mean_2.png ... etc (2 is enough) images of means of the clusters. Update: no need to submit variances. You can use your code to plot the means or use the canvas below to plot them.
(2) output.txt contains the list of group labels, one number per line, 1000 lines.
(3) code.

* Things to try
(1) There are two ways to normalize the drawings: (a) systematically subsample (x, y) from the drawing, (b) rasterize the image and use pixel intensity.
(2) Repeat the process for different initial centers.
(3) Experiment with various number of clusters.
(4) Plot either the points below or the pixels using the canvas on W1 with pixel intensities (0 to 1) or W2 with pixel gray values (0 to 255).
Input the strokes in the format x_1, y_1, x_2, y_2, ... (comma seperated, each number between 0 and 255, right click to save the png image file):


More (nonessential) details and hints: PDF.

* TAs' Solution
(1) Java: Link written by Ainur
(2) Python: Link written by Dandi
Important note: You are not allowed to copy any code from the solution. MOSS will be used check for code similarity: changing just variable names and the spacing etc is still considered cheating. You can read and learn what the solution is doing but you MUST write all code yourself. The deadline for resubmission without 50 percent penalty is July 21.





Last Updated: July 19, 2019 at 6:43 PM

  2010 layout design created by Francis Poulin