SSEblock | R Documentation |
It calculates the sum of square differences between the desired (specified by an image matrix M) denstities and empirical densities.
SSEblock(X, M, partition, loops)
X |
Initial binary network; of class |
M |
Image matrix with block densities. |
partition |
A partition in a vector format. Each unique value (positive integers) represents one cluster. |
loops |
Wheter loops are allowed or not. |
Sum of squared error (a single value).
Marjan Cugmas
X <- matrix(sample(c(0,1), size = 9**2, replace = TRUE), nrow = 9) diag(X) <- 0 M <- matrix(c(0.1, 0.4, 0.5, 0.3), nrow = 2) partition <- c(1, 2, 2, 1, 1, 2, 2, 2, 1) SSEblock(X = X, M = M, partition = partition, loops = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.