cosine {Radviz} | R Documentation |
Compute the Cosine Similarity between the Columns of a Data Set
Description
Given a dataset, compute the cosine similarity between to columns for use in optimization of Dimensional Anchors
Usage
cosine(mat)
Arguments
mat |
A matrix or data.frame |
Details
implementation by ekstroem (see StackOverflow for details)
Value
A symmetrical matrix with as many rows as there are columns in input
Author(s)
Yann Abraham
David Ruau
Examples
data(iris)
das <- c('Sepal.Length','Sepal.Width','Petal.Length','Petal.Width')
mat <- iris[,das]
sim.mat <- cosine(mat)
ncol(mat)
dim(sim.mat)
[Package Radviz version 0.9.3 Index]