SSEblock {nemBM} | R Documentation |
Sum of squared error across blocks
Description
It calculates the sum of square differences between the desired (specified by an image matrix M) denstities and empirical densities.
Usage
SSEblock(X, M, partition, loops)
Arguments
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. |
Value
Sum of squared error (a single value).
Author(s)
Marjan Cugmas
Examples
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)
[Package nemBM version 1.00.01 Index]