jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.29k stars 591 forks source link

[BUG] Bayesian Network - calling summarize and from summaries on unknown values #988

Closed dolevamir closed 1 year ago

dolevamir commented 1 year ago

I've seen multiple issues around fitting a bayesian network model using new unknown values (#605)

I'm still not sure what is the proposed workflow for the following usecase:

  1. I have an initial large dataset which I want to fit a BN into
  2. I want to predict on new examples, and update the model parameters every x examples. For this I want to use summarize and from summaries, but this fails once I want to add examples for values that were not available in the initial train

Is there a way to add the new values to the model's dictionary a priori to using the from summaries / summarize command? The only hack I can think of is to export the model to dict, add the values in all relevant places with bogus weight, and then use summarize/from summaries.. Is that the recommended workaround?

Thanks

dolevamir commented 1 year ago

@jmschrei do you have any input on the above issue?

jmschrei commented 1 year ago

Thank you for opening an issue. pomegranate has recently been rewritten from the ground up to use PyTorch instead of Cython (v1.0.0), and so all issues are being closed as they are likely out of date. Please re-open or start a new issue if a related issue is still present in the new codebase.

For this specific issue, there is a way to specify a set of keys in the new code if you know them all in advance.