SciVisFall2008/Assignment 1

From VistrailsWiki
Revision as of 16:39, 23 September 2008 by Llins (talk | contribs)
Jump to navigation Jump to search

This is your second assignment for CS 5630/6630.

The assignment is due at midnight on October ??th, 2008. You will need to use the CADE handin functionality to turn in your assignment. The class account is "cs5630".

This assignment was successfully tested in release 1.2rev1263. It should work fine in releases >=1.2rev1263. Check your release before starting your work and upgrade it if necessary.

The Vistrails User's Guide will probably be helpful to you in this assignment.

The purpose of this assignment is to make sure you understand the basic plotting concepts covered in class. Examples of plotting were provided after the lectures and can be found here: PlottingVistrails.zip. As you work on the assignment, we encourage you to read the available documentation on both matplotlib and python.

Here is the initial vistrail file Assignment1.vt. This file has four tagged versions that basically loads the raw data needed in each of the four problems. As before, show your work by submitting the complete vistrail you used to solve the problems.

Exercise 1: Principles of plotting and connectd symbols plot

The file stocks.dat has the first quote for each month from January 2006 to September 2008 for the papers from Apple Inc. (AAPL) and Microsoft Corporation (MSFT). Below we present the first three lines and the last two lines of this file.

month,apple,microsoft
2008-09,140.91,25.16
2008-08,169.53,27.29
...
2006-02,68.49,25.92
2006-01,75.51,27.06

(a) Apply the principles of plotting described in class and in the class notes to generate a simple connected symbol plot for all Apple's quotes in the file stocks.dat. Tag the final version of this plot as "Problem 1a" and annotate it with an explanation of the plotting principles you used to make this a clear plot.

(b) Using as reference the quote of January 2006 directly compare the progress of Apple's and Microsoft's papers by generating a plot using superposition (both curves in the same plot). Tag this final plot as "Problem 1b" and annotate it with the conclusions you can draw from this plot.

(c) Repeat item b, but now using juxtaposition: split the two curves (i.e. Apple's paper progress relative to January 2006 and Microsoft's paper progress relative to January 2006) into two different plots (each plot in a different spreadsheet cell). Tag the final version as "Problem 1c" and annotate it describing which technique (superpostion vs. juxtaposition) makes more sense for this data and why.

Exercise 2: Histogram and number of bins

Like this year, in the Fall of 2007, during the Scientific Visualization Course we collected all the assignments of the students in Vistrails' format. The file actions_fall_2007.dat has all the timestamps of all the actions of all the students in all the assignments: a total of 132131 actions. The first three lines of this file are:

timestamp
2007-09-15 21:24:56
2007-09-15 21:25:16
...

Create a histogram for the distribution of these timestamps and highlight the folowing due dates in the histogram. (obs. note that by some reason assignment 5 had a due data before assignment 6).

| Assigment | Due Date            |
|-----------+---------------------|
|         0 | 2007-09-18 12:00:00 |
|         1 | 2007-09-18 12:00:00 |
|         2 | 2007-10-04 12:00:00 |
|         3 | 2007-10-25 12:00:00 |
|         4 | 2007-11-27 12:00:00 |
|         5 | 2007-12-15 12:00:00 |
|         6 | 2007-12-11 12:00:00 |

When you finish your histogram tag its pipeline version with "Problem 2". And annotate it answering the following questions:

(a) How did you select the bins for the histogram and why?

(b) What hypothesis can you make about the amount of work (i.e. number of actions) for the different assignments just by looking to this histogram.

(c) What pattern can you observe for the amount of work (i.e. number of actions) close to the deadlines?

Exercise 3: Dot plots for labeled data

Each line of the file microprocessors.dat (except for the header line) has two quantitative values associated with a label. The quantitative values are "year of introduction" and "number of transistors" and the label is the name of a "microprocessor" (e.g. 286, 386, 486, Pentium 4). See the first three lines of this file:

Processor,Year of Introduction,Transistors
Pentium 4 processor,2000,42000000
286,1982,120000
...

Generate two dot plots horizontally juxtaposed for these microprocessors: one for "year of introduction" and the other for "number of transistors". For "number of transistors" dot plot use log base 10 scale. The two plots should be in the same spreadsheet cell. Tag your final pipeline version as "Problem 3".

Exercise 4: Correlation, scatterplots and regression

Let A, B, C, D be four genes. A scientist measured the activity (i.e. the expression) of these genes in 100 different conditions. The results are given in file genes.dat. Here are the first three lines of this file:

A,B,C,D
0.636244,0.239430,0.745650,0.900198
0.342974,0.800676,0.375399,0.457818
...

Generate a 4 x 4 matrix of scatter plots to understand correlations between the four genes. Visually analyze the plot and rank the genes B, C, D in decrescent order of correlation to A. Now draw a linear best fit line in the plots of A with its most correlated gene, a cubic best fit curve in the plots o A with its second most correlated gene and a degree-5 polynomial best fit curve in the plots of A with its most uncorrelated gene. Tag the final pipeline version that does all this plots (in a single spreadsheet cell) as "Problem 4".