On 12.10.2016 12:37, isukritgupta wrote: > Hi Tiago, so this is what I want: > I want to calculate the log likelihood that the SBM modeled from a network > fits the network correctly. I want to compare this with the likelihood of > other model fits to the network. I have the log likelihood scores for other > model fits, but SBM is pending. > Till now, I was trying to get the edge probabilities for all the edges and > trying to calculate the log likelihood based on that, but it doesn't seem > like this is a good way to go. > > Can you give me a workaround for this with Graph Tool? > > I want to calculate the likelihood that the model generated by > minimize_blockmodel_dl fits the graph which is input into it without > dropping any constants in the process. The constants part is important > because I want the real likelihood so that I can compare it with fits of > other models.
Ah, OK. That is something else entirely. You just want to do model selection. This is fully supported in graph-tool. There are two things you can compute: 1. The joint likelihood of the graph and partition. You get this simply via the state.entropy() function, which returns the negative logarithm of this value (what is also known as the description length). See: https://graph-tool.skewed.de/static/doc/demos/inference/inference.html#model-selection 2. The full marginal distribution, corresponding to the sum of the likelihood above over all partitions. This cannot be done exactly, but can be done approximately. This is explained here: https://graph-tool.skewed.de/static/doc/demos/inference/inference.html#model-class-selection Best, Tiago -- Tiago de Paula Peixoto <ti...@skewed.de>
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list email@example.com https://lists.skewed.de/mailman/listinfo/graph-tool