morning Boyd, morning list,

if your similarity values are (or can be reduced to) vector cosines, you
could run a singular value decomposition (e.g. via PDL::MatrixOps::svd())
on your raw data and plot the decomposed U (or V) -- that way, data points
"close" to one another will wind up close together in the decomposition.
If you're using Euclidean distance (over similarity vectors) you might try
PDL::Stats::Kmeans to cluster your data, and then group the clusters
together in your plot.  there's probably a better way to do what you want,
though, but it's not occurring to me at the moment.

marmosets,
  Bryan


On Mon, Nov 28, 2016 at 11:21 PM, Boyd Duffee <[email protected]> wrote:

> Hi All,
>
> I have a list of objects and a measure of similarity between each of them
> such that I can define a matrix that holds the similarity between objects
> $i and $j as
>     $similarity->[$i]->[$j]  = sim($i, $j);
>
> I'd like to display that matrix as a heatmap but with the list of objects
> sorted so that when I plot it, objects that are similar are next to each
> other.  I'm getting a lot of heatmap results from TFW and some on CPAN, but
> they all seem to be concerned with overlays on maps rather than the
> ordering of the columns.  I can display the result with gnuplot, but I'm
> getting bogged down in the sorting.
>
> I'm in the middle of some kind of selection sort based on minimizing the
> sum of the differences between the rows, but I thought I should ask if
> anyone has any experience with pretty-ing up heatmaps or if the problem has
> already been solved.
>
> thanks,
> --
> Boyd Duffee
>   Brexit has made Europe the new rock and roll,
>   that thing the older generation just doesn't understand.
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
>


-- 
Bryan Jurish                           "There is *always* one more bug."
[email protected]         -Lubarsky's Law of Cybernetic Entomology
------------------------------------------------------------------------------
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to