In reference to GrossSBM/sbm#3,
if the following couple of lines are correct,

Then it seems that the prediction function in the case of Bernoulli for LBM/SBM with covariates is unexact, isn't it ?
B <- matrix(0, nrow(adj), ncol(adj))
for (k in 1:length(covariates)) {
B <- B + model_parameters[[Q]]$beta[k] * covariates[[k]]
}
if (membership_name == "LBM") {
return(sigmo(memberships[[Q]]$Z1 %*% model_parameters[[Q]]$m %*%
t(memberships[[Q]]$Z2) + B))
}
else {
return(sigmo(memberships[[Q]]$Z %*% model_parameters[[Q]]$m %*%
t(memberships[[Q]]$Z) + B))
It would be correct only of the Z are indicator matrices but they are posterior probabilities.
Am I missing something?
In reference to GrossSBM/sbm#3,
if the following couple of lines are correct,
Then it seems that the prediction function in the case of Bernoulli for LBM/SBM with covariates is unexact, isn't it ?
It would be correct only of the Z are indicator matrices but they are posterior probabilities.
Am I missing something?