Displaying 1 result from an estimated 1 matches for "cosinedissimilarity".
2005 Oct 24
0
error messages in matrix multiplication
...ents
With (b) I obtain the message - Warning message:NAs produced by integer
overflow in: sum(A * A) * sum(B * B) :
(a) Matrix
testA <-read.table("c:\\matrixA.txt",header=T)
testB <-read.table("c:\\matrixB.txt",header=T)
A<-as.matrix(testA)
B<-as.matrix(testB)
cosineDissimilarity <- sum(A%*%B)/sqrt(sum(A%*%A)*sum(B%*%B))
(b) pointwise
testA <-read.table("c:\\matrixA.txt",header=T)
testB <-read.table("c:\\matrixB.txt",header=T)
A<-as.matrix(testA)
B<-as.matrix(testB)
cosineDissimilarity <- sum(A*B)/sqrt(sum(A*A)*sum(B*B))
Any su...