1
$\begingroup$

I am using scikit-learn to fit a gaussian mixture on a non-parametric multivariate distribution with three variables $ \mathbf{X} = (X_1, X_2, X_3) $

I want to sample from that distribution given specific values for $ X_1, X_2 $, i.e. I want to sample from the conditional distribution of $ X_3 $ given $X_1$ and $X_2$. Similarly, I also want to sample values $X_1,X_2$ given $X_3$.

Is this possible with the GaussianMixture class? If not, how would I go about writing a function like conditional_sample(X,size) where X is a vector of fixed values?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.