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

Sampling from Bayesian network? #67

Open
notna07 opened this issue Dec 9, 2022 · 0 comments
Open

Sampling from Bayesian network? #67

notna07 opened this issue Dec 9, 2022 · 0 comments
Labels
question Further information is requested

Comments

@notna07
Copy link

notna07 commented Dec 9, 2022

I'm interested in using Bayesian networks for synthetic data generation experiments. I can fit my data, and look at the structure, and even simulate new data. However, it seems with this package there is no way of simulating data conditioned on known variables? e.i. say I wanted to make more women for the Titanic dataset to have balanced classes, or something similar - is there a way of providing a dataframe and have the BN fill out the missing values and columns?

EDIT:
To clarify, I was looking for something like
samples = bn.sampling(model, n_samples, {Sex: 1, 'Pclass': 0})
or just adding in a dataframe instead of the n_samples,

condition_df = pd.DataFrame(np.ones(100), columns=['Sex'])

samples = bn.sampling(model, condition_df)

but did not find anything in the documentation

@erdogant erdogant added the question Further information is requested label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants