search for: normrow

Displaying 1 result from an estimated 1 matches for "normrow".

Did you mean: borrow
2002 Jan 25
1
Fw: Summary for Distance matrix by cosine?
...<- function(ma) { # zunaechst werden die Zeilen der Matrix normalisiert nreihe <- nrow(ma) nspalte <- ncol(ma) print(nspalte) c <- matrix(NA, nreihe, nspalte) row.names(c) <- row.names(ma) colnames(c) <- colnames(ma) for (i in 1:nreihe) { print(i) normrow <- norm(ma[i,],"F") for (j in 1:nspalte) { c[i,j] <-ma[i,j]/normrow } } print(c) return (c) } # und somit ist der Cosinus identisch mit dem Skalarprodukt # and thus the Cosine is identical to the inner product distmatrix_cos <- function(c) {...