Note that there are some explanatory texts on larger screens.

plurals
  1. POReordering matrix elements to reflect column and row clustering in naiive python
    primarykey
    data
    text
    <p>I'm looking for a way to perform clustering separately on matrix rows and than on its columns, reorder the data in the matrix to reflect the clustering and putting it all together. The clustering problem is easily solvable, so is the dendrogram creation (for example in <a href="http://www.janeriksolem.net/2009/04/hierarchical-clustering-in-python.html" rel="noreferrer">this blog</a> or in <a href="http://oreilly.com/catalog/9780596529321" rel="noreferrer">"Programming collective intelligence"</a>). However, how to reorder the data remains unclear for me. </p> <p>Eventually, I'm looking for a way of creating graphs similar to the one below using naive Python (with any "standard" library such as numpy, matplotlib etc, but without <a href="http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/python/heatmap/#Python" rel="noreferrer">using R</a> or other external tools).</p> <p><a href="http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/r/heatmap/no_scaling.png" rel="noreferrer">dendogram http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/r/heatmap/no_scaling.png</a></p> <p><strong>Clarifications</strong></p> <p>I was asked what I meant by reordering. When you cluster data in a matrix first by matrix rows, then by its columns, each matrix cell can be identified by the position in the two dendrograms. If you reorder the rows and the columns of the original matrix such that the elements that are close each to another in the dendrograms become close each to another in the matrix, and then generate heatmap, the clustering of the data may become evident to the viewer (as in the figure above)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload