PhilChodrow / HypergraphModularity

Code for generative hypergraph clustering via modularity-like objective functions.
MIT License
22 stars 5 forks source link

Modularity terms + true likelihood don't match #1

Closed PhilChodrow closed 4 years ago

PhilChodrow commented 4 years ago

Need to clarify the math, but this could actually be due to combinatorial issues on either side. Implemented a unit test to check for this, currently failing.

nveldt commented 4 years ago

I found the issue--it's in my code...this is my bad. I was thinking about evaluating the first term on hypergraphs that don't have degenerate hyperedges. I think in practice this will be the case for most real world datasets we run experiments on, but this is not the case for the HSBM generator. In either case I should make my code more general and flexible. Fixing this now and I'll push and update shortly.

PhilChodrow commented 4 years ago

Awesome, thanks. As mentioned over email (was on my phone, sorry), I suspect there is at least one more bug here. Will work on merging in some changes from unit testing and hopefully that will be progress...

PhilChodrow commented 4 years ago

Yeah, so after further investigation I think I may have fixed the likelihood end of this, but I have some concerns about counting issues in the the vol term. Will keep looking...

PhilChodrow commented 4 years ago

OK, so I was finally able to make this test pass. Interestingly, it's actually slightly subtle WHERE we need those combinatorial corrections and where we don't. Some of them show up within logarithms, for example, while others don't. Will try to write up the math and try to carefully show where we need these early next week.