search for: term5

Displaying 2 results from an estimated 2 matches for "term5".

Did you mean: terms
2010 Nov 10
3
create a pairwise coocurrence matrix
Hi all, I am trying to construct a pairwise coocurrence matrix for certain terms appearing in a number of documents. For example I have the following table with binary values showing the presence or absence of a certain term in a document: term1 term2 term3 term4 term5 doc1 1 1 0 0 1 doc2 1 1 0 1 1 doc3 1 0 0 0 1 And I want to have a matrix with the number of the pairwise coocurrencies. So, based on the above table the matrix should be: term1 term2 term3 term4 term5 term1 0 2 0 1 3 term2 2 0 0 1 2 term3 0 0 0 0 0 term4 1 1 0 0 1 term5 3 2 0 1 1 Any ideas...
2007 Jan 01
4
Help with filled.contour()
...rst approximation to what I need: *********************************** mu1 <- 0 mu2 <- 5 s <- 1 x <- seq(-2.5, 7.5, length = 41) y <- seq(-2.5, 2.5, length = 41) f <- function(x,y){ term1 <- 1/(2*pi*sqrt(s*s)) term2 <- -1/2 term3 <- (x - mu1)^2/s term4 <- (y - mu1)^2/s term5 <- (x - mu2)^2/s term1*(.5 * exp(term2*(term3 + term4)) + .5 * exp(term2*(term5 + term4))) } z <- outer(x, y, f) persp(x, y, z) require(grDevices) filled.contour(x, y, z, axes = F, frame.plot = F, asp = 1, col = palette(gray(seq(0, 0.9, len = 25))), nlevels = 25) **********************...