resunivMDS_RPS: Given a n x n distance matrix D (not necessarily Euclidean)...

Description Usage Arguments Value Author(s) Examples

View source: R/resunivMDS_RPS.R

Description

Given a n x n distance matrix D (not necessarily Euclidean) and a initial set X0 (that is, a n x k matrix) of n seeds in k dim, this function finds a set of n points in k dimensions X (that is, a k x n matrix) using a resistant criterion such that the n x n matrix Dk of euclidean distances among these new points X is as close as possible to D.

Usage

1

Arguments

D

distance matrix n x n to be approximated

k

dimension of output results

Value

X A set of n points in k dimensions

Author(s)

Guillermo Pacheco, Viviana Ferraggine, Sebastian Torcida

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
source = array(matrix(nrow = 8,ncol = 3),c(8,3,3),dimnames = NULL)
source[,,1] <- matrix(c(3,0,0,3,0,1,3,1,1,3,1,0,0,0,0,0,0,1,0,1,1,0,1,0)
                   ,nrow = 8,ncol = 3,byrow = TRUE)
source[,,2] <- matrix(c(3, 0 ,0,3, 0, 0.5,3, 1 ,0.75,3 ,1 ,0,0 ,0 ,0,0, 0 ,1,0, 1, 1,0, 1, 0.25)
                     ,nrow = 8,ncol = 3,byrow = TRUE)
source[,,3] <- matrix(c(5, 2 ,1,3, 0, 1.5,3.4, 1 ,1.75,3 ,1 ,0,0 ,0 ,0,0, 2 ,1,0, 3, 1,0, 1, 0.75)
                     ,nrow = 8,ncol = 3,byrow = TRUE)
result <- RPS::robgit_RPS(source, consenso = FALSE)
distance <- RPS::resdistance_RPS(result)
RPS::resunivMDS_RPS(distance,2)

RPS documentation built on May 2, 2019, 3:29 p.m.