Application: data visualization by projection on a line
- Senate voting data
- Visualization of high-dimensional data via projection on a line
- Examples
Senate voting data
In this section, we are focussing on a data set containing the votes of US Senators. This dataset can be represented as a collection of vectors , in , with the number of bills, and the number of Senators. Thus, contains all the votes of Senator , and the -th component of contains the vote of that Senator on bill .
Senate voting matrix: This image shows the votes of the Senators in the 2004-2006 US Senate, for a total of bills. “Yes” votes are represented as ‘s, “No” as ‘s, and the other votes are recorded as . Each row represents the votes of a single Senator, and each column contains the votes of all Senators for a particular bill. The vectors , can be read as rows in the picture. Source: VoteWorld. |
Visualization of high-dimensional data via projection
As seen in the picture above, simply plotting the raw data is often not very informative.
We can try to visualize the data set, by projecting each data point (each row or column of the matrix) on (say) a one-, two- or three-dimensional space. Each ‘‘view’’ corresponds to a particular projection, that is, a particular one-, two- or three-dimensional subspace on which we choose to project the data. Let us detail what it means to project on a one-dimensional set, that is, on a line.
Projecting on a line allows to assign a single number, or ‘‘score’’, to each data point, via a scalar product. We choose a (normalized) direction , and a scalar . This corresponds to the affine ‘‘scoring’’ function , which, to a generic data point , assigns the value
We thus obtain a vector of values , with components , . It is often useful to center these scores around zero. This can be done by choosing v such that
The zero-mean condition implies , where
is the vector of sample averages of the different data points. The vector can be interpreted as the ‘‘average response’’ across data points (the average vote across Senators in our running example). The values of our scoring function can now be expressed as
In order to be able to compare the relative merits of different directions, we can assume, without loss of generality, that the direction vector u is normalized (so that ).
Note that our definition of above is consistent with the idea of projecting the data points on the line passing through the origin and with normalized direction . Indeed, the component of on the line is .
In the Senate voting example above, a particular projection (that is, a direction in ) corresponds to assigning a ‘‘score’’ to each Senator, and thus represents all the Senators as a single value on a line. We will project the data along a vector in the ‘‘bill’’ space, which is . That is, we are going to form linear combinations of the bills, so that the votes for each Senator are reduced to a single number, or ‘‘score’’. Since we centered our data, the average score (across Senators) is zero.
Examples
Projection on a random direction
Projection on the ‘‘all-ones’’ vector
Clearly, not all directions are ‘‘good’’, in the sense of producing informative plots. Here, we discuss a general principle that allows choosing an ‘‘informative’’ direction. But for this data set, a good guess could be to choose the direction that corresponds to the ‘‘average bill’’. That is, we choose the direction to be the parallel to the vector of ones in , scaled appropriately so that its Euclidean norm is one.