Description Usage Arguments Details Value Author(s) Examples
This function computes a fechnerian distance matrix from either a similarity matrix or a dissimilarity matrix. In addition to the basic procedure which looks for the shortest paths between the objects in the dissimilarity matrix a second approach is offered which connects similarities in a multiplicative manner.
1 2 |
x |
A similarity or dissimilarity matrix. |
x.type |
The type of the matrix ( |
scale |
Either divide the similarities by the diagonal entries
( |
path.op |
Whether to use the similarities to find multiplicative paths ( |
sym.op |
This sets the function which is used to ensure symmetry. |
rescale |
Whether or not the original diagonal will be used for a correction of the results. |
exclude.zero |
If |
check |
Whether or not to check for regular minimality or maximality. |
The algorithm first computes a dissimilarity matrix with a zero-diagonal. Then it iteratively tries to find shorter paths between the items.
The Fechnerian distance matrix.
Alexander Pilhoefer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(olives)
#not a distance matrix, but a similarity matrix in some sense
cx <- 1-abs(cor(olives[-c(1,2,11)]))
cx2 <- quickfechner(cx)
rownames(cx2) <- names(olives)[-c(1,2,11)]
plot(hclust(as.dist(cx2)))
dm <- matrix(runif(100),10,10)
dm <- dm+t(dm)
diag(dm) <- 0
dm2 <- quickfechner(dm)
dmS <- 1-dm/max(dm)
dmS2 <- quickfechner(dmS, x.type="sim", path.op = "*")
## Not run:
# check triangular inequality:
extracat:::trinq(dm)
extracat:::trinq(dm2)
extracat:::trinq(dmS2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.