Skip to main content
Bumped by Community user
Detailed the reweighting method to address comment
Source Link
James
  • 343
  • 4
  • 13

Given $3$ real variables $x_1, x_2, x_3 \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_3) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $C$ a normalization constant, and $f$ is defined as follows. Consider three binary variables, or 'spins', $S_i = \pm 1, i=1,..,N$, their Hamiltonian \begin{equation} H_{\bf x}[{\bf S}] \equiv - (x_1 S_1 S_2 + x_2 S_1 S_3 + x_3 S_2 S_3), \end{equation}
where the $x$s can be interpreted as the couplings between spin pairs. Let me denote by ${\bf S}^1_{{\bf x}}$ and ${\bf S}^{2}_{{\bf x}}$ the ground state and the first excited state of $H_{\bf x}$, respectively, and set

\begin{equation} f({\bf x}) = (H_{\bf x}[{\bf S}^1_{\bf x}]-H_{\bf x}[{\bf S}^2_{\bf x}])^2. \end{equation}

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • theThe reweighting method, where one draws each variable $x_i$ from $p(x_i)$, and obtains a 'temporary' random sample ${\bf x}^1_{\rm t}$. One repeats $S\gg 1$ times and obtains $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$. One introduces the weight of each of these samples $w^s \propto \exp[f({\bf x^s_{\rm t}})]$ and resamples the temporary samples according to their weights, which will be then distributed according to $P$.:
  1. Consider a 'temporary' random sample ${\bf x}^1_{\rm t}$, where each of the three entries of ${\bf x}^1_{\rm t}$ is drawn independently from $p$.
  2. Repeat point 1 $S\gg 1$ times and obtain $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$.
  3. Introduce the weight of each of these samples \begin{equation} w^s \equiv \frac{e^{f({\bf x}^s_{\rm t})}}{\sum_{p=1}^S e^{f({\bf x}^p_{\rm t})}} \end{equation}
  4. Reweighting: draw a random number $r$ uniformly distributed in $[0,1)$, find the value of $s$ such that \begin{equation} \sum_{p=1}^s w^p < r < \sum_{p=1}^{s+1} w^p, \end{equation} and obtain sample ${\bf X}_1 \equiv {\bf x}^s_t$.
  5. Repeat point 4 $S\gg 1$ times and obtain samples ${\bf X}^1, \cdots, {\bf X}^S$, which are distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

Given $3$ real variables $x_1, x_2, x_3 \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_3) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $C$ a normalization constant, and $f$ is defined as follows. Consider three binary variables, or 'spins', $S_i = \pm 1, i=1,..,N$, their Hamiltonian \begin{equation} H_{\bf x}[{\bf S}] \equiv - (x_1 S_1 S_2 + x_2 S_1 S_3 + x_3 S_2 S_3), \end{equation}
where the $x$s can be interpreted as the couplings between spin pairs. Let me denote by ${\bf S}^1_{{\bf x}}$ and ${\bf S}^{2}_{{\bf x}}$ the ground state and the first excited state of $H_{\bf x}$, respectively, and set

\begin{equation} f({\bf x}) = (H_{\bf x}[{\bf S}^1_{\bf x}]-H_{\bf x}[{\bf S}^2_{\bf x}])^2. \end{equation}

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • the reweighting method, where one draws each variable $x_i$ from $p(x_i)$, and obtains a 'temporary' random sample ${\bf x}^1_{\rm t}$. One repeats $S\gg 1$ times and obtains $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$. One introduces the weight of each of these samples $w^s \propto \exp[f({\bf x^s_{\rm t}})]$ and resamples the temporary samples according to their weights, which will be then distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

Given $3$ real variables $x_1, x_2, x_3 \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_3) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $C$ a normalization constant, and $f$ is defined as follows. Consider three binary variables, or 'spins', $S_i = \pm 1, i=1,..,N$, their Hamiltonian \begin{equation} H_{\bf x}[{\bf S}] \equiv - (x_1 S_1 S_2 + x_2 S_1 S_3 + x_3 S_2 S_3), \end{equation}
where the $x$s can be interpreted as the couplings between spin pairs. Let me denote by ${\bf S}^1_{{\bf x}}$ and ${\bf S}^{2}_{{\bf x}}$ the ground state and the first excited state of $H_{\bf x}$, respectively, and set

\begin{equation} f({\bf x}) = (H_{\bf x}[{\bf S}^1_{\bf x}]-H_{\bf x}[{\bf S}^2_{\bf x}])^2. \end{equation}

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • The reweighting method:
  1. Consider a 'temporary' random sample ${\bf x}^1_{\rm t}$, where each of the three entries of ${\bf x}^1_{\rm t}$ is drawn independently from $p$.
  2. Repeat point 1 $S\gg 1$ times and obtain $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$.
  3. Introduce the weight of each of these samples \begin{equation} w^s \equiv \frac{e^{f({\bf x}^s_{\rm t})}}{\sum_{p=1}^S e^{f({\bf x}^p_{\rm t})}} \end{equation}
  4. Reweighting: draw a random number $r$ uniformly distributed in $[0,1)$, find the value of $s$ such that \begin{equation} \sum_{p=1}^s w^p < r < \sum_{p=1}^{s+1} w^p, \end{equation} and obtain sample ${\bf X}_1 \equiv {\bf x}^s_t$.
  5. Repeat point 4 $S\gg 1$ times and obtain samples ${\bf X}^1, \cdots, {\bf X}^S$, which are distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

Clarified the problem by defining $f$ explicitly.
Source Link
James
  • 343
  • 4
  • 13

Given $N$$3$ real variables $x_1, \cdots, x_N \equiv \bf{x}$$x_1, x_2, x_3 \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_N) \exp[f({\bf x})], \end{equation}\begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_3) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $f({\bf x})$ a known function, and $C$ a normalization constant. Note that if $P$ did not contain, and $f$ is defined as follows. Consider three binary variables, thenor 'spins', $S_i = \pm 1, i=1,..,N$, their Hamiltonian \begin{equation} H_{\bf x}[{\bf S}] \equiv - (x_1 S_1 S_2 + x_2 S_1 S_3 + x_3 S_2 S_3), \end{equation}
where the variables $\bf x$ would$x$s can be independentinterpreted as the couplings between spin pairs. Let me denote by ${\bf S}^1_{{\bf x}}$ and ${\bf S}^{2}_{{\bf x}}$ the ground state and the first excited state of $H_{\bf x}$, respectively, and set

\begin{equation} f({\bf x}) = (H_{\bf x}[{\bf S}^1_{\bf x}]-H_{\bf x}[{\bf S}^2_{\bf x}])^2. \end{equation}

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that draw random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • the reweighting method, where one draws each variable $x_i$ from $p(x_i)$, and obtains a 'temporary' random sample ${\bf x}^1_{\rm t}$. One repeats $S\gg 1$ times and obtains $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$. One introduces the weight of each of these samples $w^s \propto \exp[f({\bf x^s_{\rm t}})]$ and resamples the temporary samples according to their weights, which will be then distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

Given $N$ real variables $x_1, \cdots, x_N \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_N) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $f({\bf x})$ a known function, and $C$ a normalization constant. Note that if $P$ did not contain $f$, then the variables $\bf x$ would be independent.

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that draw random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • the reweighting method, where one draws each variable $x_i$ from $p(x_i)$, and obtains a 'temporary' random sample ${\bf x}^1_{\rm t}$. One repeats $S\gg 1$ times and obtains $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$. One introduces the weight of each of these samples $w^s \propto \exp[f({\bf x^s_{\rm t}})]$ and resamples the temporary samples according to their weights, which will be then distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

Given $3$ real variables $x_1, x_2, x_3 \equiv \bf{x}$, consider their probability density function (PDF) \begin{equation} P({\bf x}) = C \, p(x_1) \cdots p(x_3) \exp[f({\bf x})], \end{equation} where $p(x)$ is a known one-dimensional PDF, $C$ a normalization constant, and $f$ is defined as follows. Consider three binary variables, or 'spins', $S_i = \pm 1, i=1,..,N$, their Hamiltonian \begin{equation} H_{\bf x}[{\bf S}] \equiv - (x_1 S_1 S_2 + x_2 S_1 S_3 + x_3 S_2 S_3), \end{equation}
where the $x$s can be interpreted as the couplings between spin pairs. Let me denote by ${\bf S}^1_{{\bf x}}$ and ${\bf S}^{2}_{{\bf x}}$ the ground state and the first excited state of $H_{\bf x}$, respectively, and set

\begin{equation} f({\bf x}) = (H_{\bf x}[{\bf S}^1_{\bf x}]-H_{\bf x}[{\bf S}^2_{\bf x}])^2. \end{equation}

Do you know an efficient method to draw random samples from $P$, given the particular form above of $P$?

In particular, the form of $P$ above is such that random samples from the factorized distributions $p(x)$ can be easily drawn with inverse transform sampling.

I have tried the two following methods to solve my problem:

  • the reweighting method, where one draws each variable $x_i$ from $p(x_i)$, and obtains a 'temporary' random sample ${\bf x}^1_{\rm t}$. One repeats $S\gg 1$ times and obtains $S$ temporary samples ${\bf x}^1_{\rm t}, \cdots, {\bf x}^S_{\rm t}$. One introduces the weight of each of these samples $w^s \propto \exp[f({\bf x^s_{\rm t}})]$ and resamples the temporary samples according to their weights, which will be then distributed according to $P$.
  • the Markov Chain Monte Carlo method.

However, both methods are not efficient for my specific problem.

deleted 1 character in body
Source Link
James
  • 343
  • 4
  • 13
Loading
Source Link
James
  • 343
  • 4
  • 13
Loading