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

Fixed DEMove Implementation #480

Merged
merged 4 commits into from
Oct 5, 2023
Merged

Conversation

StarostinV
Copy link
Contributor

Problem:

  • I observed that the current implementation of DEMove, although stated to follow Nelson et al. 2013, does not actually align with the paper's approach. The existing implementation lacked affine-invariance, which is fixed in Nelson's paper.
  • There was potential to optimize performance via vectorization.

Changes

Changes are only made in the implementation of DEMove in de.py.

  • Alignment with Nelson et al. 2013:
    Fixed the discrepancy between the stated and actual approaches. The normal noise $\epsilon \sim N(0, \sigma^2)$ used to be added to the proposal as per $\gamma_0 (x_i - x_j) + \epsilon$. In this case, $\sigma$ should be tuned for each dimension, which confronts the idea of affine-invariance. Now it defines the distribution over gamma: $\gamma = \gamma_0 (1 + \epsilon)$, which follows Nelson et al. 2013 and ensures affine-invariance.

  • Vectorization for improved performance:
    Removed a loop in favor of vectorized operations. Benchmarks showed a speed boost ranging from 5-10 times depending on the number of walkers.

  • Simplified walker splitting:
    The new implementation requires splitting the walker population into two sets as opposed to the previous three-set approach.

@dfm
Copy link
Owner

dfm commented Oct 5, 2023

Thanks! This looks good to me!

@dfm dfm merged commit 61506f6 into dfm:main Oct 5, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants