Difference between revisions of "SciVisFall2008/Assignment 1"

From VistrailsWiki
Jump to navigation Jump to search
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
This is your second assignment for CS 5630/6630.  
This is your second assignment for CS 5630/6630.  


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


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


The [http://downloads.sourceforge.net/vistrails/vistrails-usersguide-1.2-rev191.pdf Vistrails User's Guide] will probably be helpful to you in this assignment.
The [http://downloads.sourceforge.net/vistrails/vistrails-usersguide-1.2-rev191.pdf Vistrails User's Guide] will probably be helpful to you in this assignment.
Line 13: Line 13:
The purpose of this assignment is to make sure you understand the basic plotting  
The purpose of this assignment is to make sure you understand the basic plotting  
concepts covered in class and learn matplotlib/python/Vistrails as a tool do
concepts covered in class and learn matplotlib/python/Vistrails as a tool do
produce plots. Examples of plotting were provided after the lectures  
produce plots. Examples of plotting were provided in the lectures  
and can be found here: [http://www.sci.utah.edu/~stevec/classes/cs5630/PlottingVistrails.zip PlottingVistrails.zip].  
and can be found here: [http://www.sci.utah.edu/~stevec/classes/cs5630/PlottingVistrails.zip PlottingVistrails.zip].  
As you work on the assignment, we encourage you to read the available documentation  
As you work on the assignment, we encourage you to read the available documentation  
Line 22: Line 22:
actions-fall-2007.dat (problem 2), microprocessors.dat (problem 3) and genes.dat (problem 4).
actions-fall-2007.dat (problem 2), microprocessors.dat (problem 3) and genes.dat (problem 4).
These four files are packed into a single zip file called: Hw1data.zip. The task of unzipping  
These four files are packed into a single zip file called: Hw1data.zip. The task of unzipping  
and locating these files is done in the starting vistrails file for this assignment:  
and locating these files is already done in the starting vistrails file for this assignment:  
[http://www.vistrails.org/images/Assignment1.vt Assignment1.vt]. You should solve
[http://www.vistrails.org/images/Assignment1.vt Assignment1.vt]. You should solve
the problems by starting from this vistrails file. When you open [http://www.vistrails.org/images/Assignment1.vt Assignment1.vt]
the problems by working directly in this vistrails file. When you open [http://www.vistrails.org/images/Assignment1.vt Assignment1.vt]
you will see four tagged versions that basically loads the raw data needed in each of the four problems.
you will see 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.
As before, show your work by submitting the complete vistrail you used to solve the problems.
Line 46: Line 46:
and in the class notes to generate a simple connected   
and in the class notes to generate a simple connected   
symbol plot for all Apple's quotes in the file           
symbol plot for all Apple's quotes in the file           
[[stocks.dat]]. Tag the final version of this plot as   
''stocks.dat''. Tag the final version of this plot as   
"Problem 1a" and annotate it with an explanation         
"Problem 1a" and annotate it with an explanation         
of the plotting principles you used to make this         
of the plotting principles you used to make this         
Line 70: Line 70:
the Scientific Visualization Course we collected  
the Scientific Visualization Course we collected  
all the assignments of the students in Vistrails'
all the assignments of the students in Vistrails'
format. The file [[actions_fall_2007.dat]] has all the  
format. The file ''actions_fall_2007.dat'' has all the  
timestamps of all the actions of all the students
timestamps of all the actions of all the students
in all the assignments: a total of 132131 actions.
in all the assignments: a total of 132131 actions.
Line 113: Line 113:
== Exercise 3: Dot plots for labeled data ==
== Exercise 3: Dot plots for labeled data ==


Each line of the file [[microprocessors.dat]] (except for the header line) has  
Each line of the file ''microprocessors.dat'' (except for the header line) has  
two quantitative values associated with a
two quantitative values associated with a
label. The quantitative values are "year of introduction"
label. The quantitative values are "year of introduction"
Line 137: Line 137:
Let A, B, C, D be four genes. A scientist measured the activity
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
(i.e. the expression) of these genes in 100 different conditions. The
results are given in file [[genes.dat]].  Here are the first
results are given in file ''genes.dat''.  Here are the first
three lines of this file:
three lines of this file:


Line 150: Line 150:
decrescent order of correlation to A. Now draw a linear best fit line
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
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  
curve in the plots of A with its second most correlated gene and a  
degree-5 polynomial best fit curve in the plots of A with its most  
degree-5 polynomial best fit curve in the plots of A with its most  
uncorrelated gene.  Tag the final pipeline version that does all  
uncorrelated gene.  Tag the final pipeline version that does all  
this plots (in a single spreadsheet cell) as "Problem 4".
this plots (in a single spreadsheet cell) as "Problem 4".

Latest revision as of 16:02, 25 September 2008

This is your second assignment for CS 5630/6630.

The assignment is due at midnight on October 6th, 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.2.1rev1336. It should work fine in releases >=1.2.1rev1336. 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 and learn matplotlib/python/Vistrails as a tool do produce plots. Examples of plotting were provided in 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.

The data for the four problems of this assignment are in four files: stocks.dat (problem 1), actions-fall-2007.dat (problem 2), microprocessors.dat (problem 3) and genes.dat (problem 4). These four files are packed into a single zip file called: Hw1data.zip. The task of unzipping and locating these files is already done in the starting vistrails file for this assignment: Assignment1.vt. You should solve the problems by working directly in this vistrails file. When you open Assignment1.vt you will see 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 of 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".