Assignment 3:
(1)
Use PCA to reconstruct faces using this
Jupyter notebook
(2)
Unmix the sounds (mixedX.wav, mixedY.wav) from
this repo
using sklearn's FastICA.
-
Refer to the two sample codes at
scikit
and
github
for help with syntax and setup.
-
Refactor and combine the two sample codes so that no code is in global scope.
-
Compute the distance between the source sound files (s1,s2) and the reconstructed sound files (r1,r2) as
DIST(a,b) = |a_1 - b_1| + ... |a_n - b_n| (Hint: you can use numpy to compute this)
-
Record DIST(s1,r1), DIST(s1,r2), DIST(s2,r1), DIST(s2,r2) using the default
"whiten = True" in FastICA
-
Record DIST(s1,r1), DIST(s1,r2), DIST(s2,r1), DIST(s2,r2) using "whiten = False"
Deliverables for (2)
-
code file
-
distances with and without whitening.
-
Comment on whitening (50 words or less)
Q + A
-
Q: question 1 of part 1, what do you mean by "plot the principal components"
"describe the principal components," would you like us to describe each one or just what they represent in general?
A: Each principal component is an image (image = vector of pixels). Display the image(s) and comment.
-
Q: part 2 where to find the source sound files (s1, s2) and the reconstructed sound files (r1, r2).
Are s1 and s2 ... data1 and data2? Are r1 and r2 provided for us?
A: s1, s2 are the input files and r1, r2 the output files
(use scikit learn's implementation of FastICA with the sound file loading setup from the github link)