lpetrich
Contributor
Chart of the Week: How the Supreme Court justices line up | Pew Research Center
That page shows what is called in phylogeny and data mining a "distance matrix". One can then use some cluster algorithm to find out who votes most like whom. I transcribed the numbers into Mathematica, and then wrote a Neighbor Joining algorithm in Mathematica. I got a sort of family tree of the Justices' voting differences:
It's rather easy to recognize the well-known voting blocs in the Court.
I also ought to try to write a Fitch-Margoliash least-squares algorithm, but I'd then have to search through tree topologies.
I then did k-medoid clustering, an alternative to k-means that can work with distance matrices. Its cluster centers are data-set members, so one can use already-done distance calculations for it. It uses random initial selections, so I did 100 runs with each cluster size to get a good selection.
My results:
2 clusters:
Liberal justices centered on Elena Kagan
Conservative justices centered on John Roberts
3 clusters:
Liberal justices centered on Elena Kagan
Anthony Kennedy in his own cluster
Non-Kennedy conservative justices centered on John Roberts
4 clusters:
Half the time, Stephen Breyer split off from the liberal bloc, and half the time, the non-Kennedy conservative bloc split into Roberts-Alito and Scalia-Thomas sub-blocs
5 clusters:
Both splits mentioned for 4 clusters
That page shows what is called in phylogeny and data mining a "distance matrix". One can then use some cluster algorithm to find out who votes most like whom. I transcribed the numbers into Mathematica, and then wrote a Neighbor Joining algorithm in Mathematica. I got a sort of family tree of the Justices' voting differences:
Code:
24.3906
- 11.75
- - Stephen Breyer
- - 8.5
- - - Ruth Bader Ginsburg
- - - 6.
- - - - Sonia Sotomayor
- - - - Elena Kagan
- 15.
- - Anthony Kennedy
- - 10.75
- - - 7.
- - - - John Roberts
- - - - Samuel Alito
- - - 9.
- - - - Antonin Scalia
- - - - Clarence Thomas
I also ought to try to write a Fitch-Margoliash least-squares algorithm, but I'd then have to search through tree topologies.
I then did k-medoid clustering, an alternative to k-means that can work with distance matrices. Its cluster centers are data-set members, so one can use already-done distance calculations for it. It uses random initial selections, so I did 100 runs with each cluster size to get a good selection.
My results:
2 clusters:
Liberal justices centered on Elena Kagan
Conservative justices centered on John Roberts
3 clusters:
Liberal justices centered on Elena Kagan
Anthony Kennedy in his own cluster
Non-Kennedy conservative justices centered on John Roberts
4 clusters:
Half the time, Stephen Breyer split off from the liberal bloc, and half the time, the non-Kennedy conservative bloc split into Roberts-Alito and Scalia-Thomas sub-blocs
5 clusters:
Both splits mentioned for 4 clusters