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.
- what difference between condensed , redundant matrices?
- 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
Post a Comment