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

Missing data #81

Open
PARODBE opened this issue Jun 12, 2023 · 10 comments
Open

Missing data #81

PARODBE opened this issue Jun 12, 2023 · 10 comments

Comments

@PARODBE
Copy link

PARODBE commented Jun 12, 2023

Hi,

One question, the library have any option for missing data computation like bnlearn of R?

Thanks!

@erdogant
Copy link
Owner

There are no imputation functions for missing data. But if you create a function that does it (without a lot of dependencies of other packages), feel free to push it!

@harrietmwwright
Copy link

Im also looking for this functionality.
At the moment if you are trying to make a prediction on a dataset and remove one of the variables it will make the prediction, however, it will error if you provide the variable with a value of NaN. Is this doing some sort of imputation/estimation in the backend?

@PARODBE
Copy link
Author

PARODBE commented Jul 27, 2023

we can use bayes theorem and with the computed posteriors removed from the equation missing data?

@erdogant
Copy link
Owner

Can you maybe make a small example to demonstrate this? Maybe with the sprinkler data set?

@PARODBE
Copy link
Author

PARODBE commented Jul 27, 2023

I know that pymc3 library do this...I have read It in a hierarchical linear regression using bayesian approach, in this moment I don't remember the article, but this blog shows something like that: http://stronginference.com/missing-data-imputation.html

@erdogant
Copy link
Owner

erdogant commented Oct 8, 2024

Impute functionality implemented in case of missing values.
See docs over here.

Update to the latest version with:

pip install -U bnlearn

@PARODBE
Copy link
Author

PARODBE commented Oct 8, 2024

You could include the MICE approach but using the same bayesian model, like using MICE random forest but with this approach, so iteratively you use the input value without missing data to compute the missing data, but with a bayesian model. What do you think?

@PARODBE
Copy link
Author

PARODBE commented Oct 8, 2024

More or less, it's an adaptation from the original. But the problem, if I'm not wrong It only supports quantitative data. This, also, there are other options which support categorical data, like this one: https://github.com/AnotherSamWilson/miceforest

But I'm not sure if you can include a bayesian model. I think that if you have build your TAN, FAN or whatever bayesian approach with your library, iteratively you build these models without missing data and predict missing data.

@erdogant
Copy link
Owner

The MICE functionality has been thanks to contributing of @Ananyapam7.
See here for more information.

Update to the latest version with:

pip install -U bnlearn

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

3 participants