-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: incorrect number of blocks in "membership" list for "estimateMultiplexSBM" method #9
Comments
Please, can you provide a reproducible code? |
Here is an example of code that produces the issue. When I ran the estimateMultiplexSBM method, it found the optimal K to be equal to 5. However, the indMemberships parameter only had 4 blocks.
I have attached the two matrices that are used in the code. They are both 80x80 symmetric matrices. I found that this issue only occurred when the matrices are of a large size. When the matrices are sufficiently small (e.g. 50x50), this issue no longer occurs. Please let me know if this is still an issue on your end. Thank you, |
Thank you, Aditya, for the reproducible code. We've investigated to see why Results$indMemberships provides you with only 4 blocks instead of five. Results$indMemberships is actually computed by running apply(Results$probMemberships[[1]],1,which.max). By the way, even if it doesn't change much, we suggest you running also Best, |
Thank you for the response. I just have one quick follow-up question. If there are nodes that have an equal probability of belonging to block 4 or block 5, then how is the blockProp measure computed? Are nodes that can belong to either block 4 or block 5 randomly assigned to one of the two blocks? Best, |
I also have another quick follow up. I want to modify the code to evaluate the model for just one value of K (e.g. K = 3). How would I change the code to make this happen? I am not entirely sure how the nbBlocksRange list in the estimOptions parameter is configured. Best, |
In the variational EM algorithm, the parameters in blockProp are estimated
as the column means of Results$probMemberships.
Therefore, when nodes have an equal probability of belonging to block 4 or
5, they count for 0.5 in this mean.
Pierre
Le jeu. 16 mars 2023 à 06:48, Aditya Iyer ***@***.***> a
écrit :
… Thank you for the response. I just have one quick follow-up question.
If there are nodes that have an equal probability of belonging to block 4
or block 5, then how is the *blockProp* measure computed? Are nodes that
can belong to either block 4 or block 5 randomly assigned to one of the two
blocks?
Best,
Aditya Iyer
—
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHP4KVQF7BH7UB7KFTHKGLDW4KSSTANCNFSM6AAAAAAVTNWOW4>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
Pierre Barbillon
https://www6.inra.fr/mia-paris/Equipes/Membres/Pierre-Barbillon
|
If you want to infer the model for a unique value of K, you can set the
minimal and maximal number of blocks to this K in the nbBlocksRange as:
Results = estimateMultiplexSBM(listSBM, dependent=FALSE,estimOptions =
list(nbBlocksRange=list(c(3,3))) );
Best,
Pierre
Le jeu. 16 mars 2023 à 07:21, Aditya Iyer ***@***.***> a
écrit :
… I also have another quick follow up.
I want to modify the code to evaluate the model for just one value of *K*
(e.g. *K = 3*). How would I change the code to make this happen? I am not
entirely sure how the *nbBlocksRange* list in the *estimOptions*
parameter is configured.
Best,
Aditya
—
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHP4KVVUUDALMYX7KMD5FKLW4KWP5ANCNFSM6AAAAAAVTNWOW4>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
Pierre Barbillon
https://www6.inra.fr/mia-paris/Equipes/Membres/Pierre-Barbillon
|
The estimateMultiplexSBM method fits the model with different values of K (the number of blocks), and it selects the value of K that produces the highest ICL. However, I found that the number of blocks in the memberships and indMemberships lists were not equal to the optimal K.
Here is an example from when I ran the code. The estimateMultiplexSBM method fit the model for each K in {1, 2, 3, 4} and found that the highest ICL value was when K=4. However, the indMemberships list looked something like this:
Note: these are only the first 9 nodes.
As you can see, there are only 3 blocks present when there should be 4.
I assume this is because the memberships and indMemberships lists are not updated to store the memberships of the model with the highest ICL. They may be storing the memberships of the model with the second-highest ICL (which is probably the second-to-last model to be fit).
Is there a way to patch this quickly?
The text was updated successfully, but these errors were encountered: