Closed KunFang93 closed 5 months ago
Sorry for the delay in responding to these issues. The answer is that conceptually it's very simple to add this in but that, implementation-wise, I struggled a little bit because the zero-inflated wrapper needs access to the per-feature log probabilities but my current implementation only gives the total log probability across all features. I think I need to just implement specific ZIP and ZINB distributions, as those are the most widely used anyway. I don't know when I'd get a chance to do that, though, so I'd recommend you try implementing them yourself based on the Poisson and ZeroInflated wrapper I provided.
Not a problem at all and thank you for the reply! I wondered if you could shed some lights on how to implement by the poisson and zero inflated wrapper? Is something like
states = []
for i in range(20): # assume 20 number of stae
cur_d = ZeroInflated(Poisson())
cur_d.fit(data)
state.append(cur_d)
model = DenseHMM(states)
model.fit(data)
Any suggestion is greatly appreciated! Thank you so much for your time and help again~
Best, Kun
You'd need to create a new distribution object that applies the formula in the zero inflated wrapper to the log probabilities BEFORE they are summed. The current objects only work if you only have one dimension.
Got it. I will delve into it. Thanks for your instruction!
Hi Jacob,
I wondered if it is possible to implement zero-inflated poisson HMM in currently version of pomegranate? I saw an old unsolved issue with NotImplementedError. I tried
but got same error:
Thanks for your time and help!
Best, Kun