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

Question on drawing drawing sample from MFK GP posterior. #475

Open
jtneedels opened this issue Nov 16, 2023 · 3 comments
Open

Question on drawing drawing sample from MFK GP posterior. #475

jtneedels opened this issue Nov 16, 2023 · 3 comments
Labels

Comments

@jtneedels
Copy link

Hi,

I'd like to be able to draw a sample from my MFK GP posterior - that is a multivariate Gaussian based on the the posterior mean and covariance. I don't see a method to generate a sample in the code (just want to check if I am missing it). Otherwise, is there a way to output the full posterior covariance matrix, rather than just the variance, so that I can generate my own samples?

Thanks so much for the help!

@relf relf added the question label Nov 16, 2023
@relf
Copy link
Member

relf commented Nov 16, 2023

Hi,

You're right, currently there is no API for sampling MFK GPs or accessing covariance matrices directly.
If you want to implement such methods take a look at krg_sampling.py where sampling for kriging is implemented.
You could mix and match the code with the one of MFK to get what you want... And then feel free to contribute with a PR 😉

@Paul-Saves
Copy link
Contributor

Paul-Saves commented Nov 16, 2023

Yes, you can sample and generate the covariance matrix within SMT. Everything is included in the utils folder:

@jtneedels
Copy link
Author

Great, thank you both so much! I'll take a look at this code and tutorial.

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

No branches or pull requests

3 participants