1
$\begingroup$

I want to perform MCMC or HMC for solving minimization problem of a function $f(x)$, then define the corresponding density $$g(x) = \exp\left(-f(x)\right)$$ Because the function of the future apply is only valid in a finite domain, I perform a variable transform by $$y = \log(x - lb) - \log(ub - x)$$, where $lb$ and $ub$ is the lower and upper boundary. Through the Jacobian formula $$G(y) = \frac{g(x)}{|J(x)|}$$ written in logarithmic form $$\log\left(G(y)\right) = -f(x) - \log\left(|J(x)|\right)$$ A new function is used for MCMC $$h(x) = -\log\left(G(y)\right) = f(x) + \log\left(|J(x)|\right)$$ I thought the minimal location of $h(x)$ is the same as $f(x)$, but the result shows it's not. I'm confused why they're different, is the jacobian formula completely correct or I misunderstand something?

Below is the McCormick function, the minimal is at (-0.55, -1.55), but the minimal of $h(x)$ is at (-0.27, -1.32). Another figure is along x axis when y = -1.55

McCormick function McCormick function

$\endgroup$
1
  • $\begingroup$ Dividing by the Jacobian virtually guarantees you will shift the locations of the extrema. This happens even for univariate variables: compare the extrema of a Normal and the associated Lognormal distribution, for instance. $\endgroup$
    – whuber
    Commented Jul 6, 2022 at 14:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.