DSCI 415 Unsupervised Learning - Assignment 4 an ICA Mystery ( Pts.)

DSCI 415 Unsupervised Learning - Assignment 4 an ICA Mystery ( Pts.)

DSCI 415 – Unsupervised Learning - Assignment 4 “An ICA Mystery“ ( pts.)

Background:

The other night my TV was acting up and the entire screen turned to static. While the video was complete scrambled, I swore I could hear maniacal laughing amongst the accompanying audio noise, that was pretty much a static also. I took several burst pictures (actually 1,000) of the screen with my iPhone and converted these pictures to pixel grayscale JPEG image files. Below are a sample of four of these images.

I suspect that multiple channels of input were coming through my cable box at the same time. Combine this with the fact that my HDMI cable was loose, which I am sure added considerable noise, and you have the static-filled images above. If I am right about the multiple input sources, independent component analysis (ICA) should prove useful in detangling these source images and finding the underlying independent source images.

Problem:

Your goal is find the underlying source signals (images) that might be making up the 1,000 noisy images contained in these data. I have no idea how many channels were being mixed, so you will have to look at several choices for the number of independent components to consider, starting small (say n.comp=2) and working your way up.

The data fileTV Images.csv is linked here:
(842 MB!!)

Here are some commands to get you started.

Images = read.csv(file.choose()) # read in the file TV Images.csv (slow!)

> Images = Images[,-1] # remove the pixel count (1 – 50625). Note:.

library(fastICA)

> Results = fastICA(Images,n.comp=k) # here you pick k, starting with k = 2.

attributes(Results)

$names

[1] "X" "K" "W" "A" "S"

The estimated sources images are contained in the columns of the matrix matrix . To view them as images, use the image command as shown below.

images(1:225, 1:225, matrix(Results$S[,j],225,225),col=gray((0:225/225))

In the command above you need to replace j by the estimated source signal you want to view (j=1,2,..,k). If the image looks like the dark and light pixels are inverted, use

1 - matrix(results$S[,j],225,225)

as the third argument to the image function. Remember if is a solution to one of the independent source components, then so is .

How many independent sources do you think are making up the massively distorted signal I was receiving? Include plots of these source images and all supporting R code! (25 pts.)