jmschrei / pomegranate

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

How Does MultivariateGaussianDistribution deal with categorical data #982

Closed KevinHHHHH0325 closed 1 year ago

KevinHHHHH0325 commented 2 years ago

Hi Jacob,

I am trying to apply the package MultivariateGaussianDistribution to deal with the categorical features (I have label, and multiple features). I am a little bit confused. Because as I know, the gaussian distribution is only suitable to numerical data, how can we apply it to categorical features? Can you help me with that? Thank you very much!!

Best, Kevin

teoML commented 2 years ago

If the features are categorical, how do you assume gaussian distribution? Providing an example would be helpful...

KevinHHHHH0325 commented 2 years ago

If the features are categorical, how do you assume gaussian distribution? Providing an example would be helpful...

Thanks for your response. My case contains 74 features and 1 label. All the features are categorical. The problem I faced is if I can not use gaussian distribution, that means I can apply the from_sample function to get the initial probability. So that means I need to manually develop them, is that correct? Thanks.

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.