2
$\begingroup$

I have a kernel based non-parametric distribution, let's assume it's a Normal kernel, but the variance of each component is different. How do I sample from this density? If all the components had the same variance, I could just sample the Normal (wich mean would be chosen) with the same probability, but I'm not sure if I can sample this way when the variance is different.

$$f(x) = \frac{1}{M}\sum^M_{i=1} \phi(x;\mu_i,\sigma^2_i), $$ where $ \phi(x;\mu_i,\sigma^2_i)$ is the density of a Normal distribution with mean $\mu_i$ and variance $\sigma^2_i$ at $x$.

$\endgroup$
5
$\begingroup$

Do a hierarchical sampling scheme:

  1. Pick $i$ uniformly from $\{1, \dots, M\}$.
  2. Sample from $\mathcal{N}(\mu_i, \sigma_i)$.

This will work for any mixture where you can sample from the components.

| cite | improve this answer | |
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.