python - What is the difference between condensed and redundant distance matrices? -


new python , programming in general:

the documentation squareform states following:

converts vector-form distance vector square-form distance matrix, , vice-versa.

converts 1d array squared matrix?

where paramenter x:

either condensed or redundant distance matrix.

and returns:

if condensed distance matrix passed, redundant 1 returned, or if redundant 1 passed, condensed distance matrix returned.

  1. what difference between condensed , redundant matrices?
  2. what relationship between condensed/redundant matrix , vector/square form in takes?

the return of pdist papers return condensed distance matrix:

returns condensed distance matrix y. each , j (where less j less n), metric dist(u=x[i], v=x[j]) computed , stored in entry ij.

am right in thinking in each element y stores distance between particular point , other point? example 3 observations mean condensed matrix 9 elements?

if have nxn matrix each pairwise combination set n exists twice, once in each order, ab , ba. if create distance matrix set of n points can condense data storing each point once, , neglecting comparisons between points , themselves.

for example if have points a, b, , c have distance matrix

       b    c   0    ab   ac b   ba   0    bc c   ca   cb   0 

and condensed distance matrix,

       b    c          ab   ac               bc 

because distance masers unsigned condensed table retains information.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -