Skip to content

Bug: Problem with the predict method for bipartiteSBM with covariates #7

Description

@Chabert-Liddell

The predict method for bipartiteSBM with covariates and 'bernoulli' distribution is highly biased, I believe there is a problem with the computation as it is different than the result given by the following code of blockmodels (with the same returned model):

for(k in seq_along(covlbm)) {
  B <- B + sbm_cov$model_parameters[[4]]$beta[k] * covlbm[[k]]
}
1/(1+exp(-sbm_cov$memberships[[4]]$Z1 %*%
               sbm_cov$model_parameters[[4]]$m %*%
               t(sbm_cov$memberships[[4]]$Z2)-B))

If I sum the above expression in a network with 129 edges, I get about 125. But the sum of the predictions with the predict method of sbm return 65.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions