Skip to content
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

log_probability not implemented for zero_inflated poisson HMM #1069

Open
hfealr1111 opened this issue Nov 9, 2023 · 2 comments
Open

log_probability not implemented for zero_inflated poisson HMM #1069

hfealr1111 opened this issue Nov 9, 2023 · 2 comments

Comments

@hfealr1111
Copy link

Hi, I am trying to infer and analyze hidden states in neuron spikings with ZIP-HMM uninitialized and fit the model to data.
model = DenseHMM([ZeroInflated(Poisson()), ZeroInflated(Poisson()), ZeroInflated(Poisson())], max_iter=1000, verbose=True)
However, it shows that

/usr/local/lib/python3.10/dist-packages/pomegranate/distributions/_distribution.py in log_probability(self, X)
     62 
     63         def log_probability(self, X):
---> 64                 raise NotImplementedError
     65 
     66         def fit(self, X, sample_weight=None):

NotImplementedError: 

I understand that zero_inflated is a wrapper so it shouldn't have any dedicated log_probability function. So, I wish to confirm with you that ZeroInflated(Poisson()) could be used in hmm this way. If so, I wish you could kindly provide a solution to this. Thanks in advance!

@jmschrei
Copy link
Owner

Yes, this is an error on my side. I will look into a solution.

@hfealr1111
Copy link
Author

Thanks, I really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants