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

Add resampling arguments #1

Closed
Luuk-Renden opened this issue Jun 8, 2023 · 1 comment
Closed

Add resampling arguments #1

Luuk-Renden opened this issue Jun 8, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Luuk-Renden
Copy link
Contributor

Problem

If MC resampling is desired, now a hardcoded conditional is needed to activate this every $N$'th optimization step:
resample=(i%N==0) (where $i$ is the optimization iteration)
The number of MC steps $n$ to be taken also requires addition of a line:
model.equilibrium_steps = n

Solution

This should ideally being done by passing arguments, something like:
resample_every = N
resample_steps = n

Defaulting to $N=iternum+1$ (no resampling) and $n=0$ (perform no extra MC steps).
---Note that setting $0 < N \leq iternum$ will have no effect if $n=0$. It is still preferable to have default $N$ as $iternum+1$ to avoid unnecessarily entering resampling loop.---

That way, first a calculation without optimization can be performed to obtain the autocorrelation time $\tau$ of the MC steps:
python src/Fermion_He_3D_variable_NN.py --iternum 0 --batch 5000
(fit exponential with decay rate $\tau$ to autocorrelation of data in output file energy_equilibration.txt)

This $\tau$ can then be used to determine $n$ for a calculation with optimization:
python src/Fermion_He_3D_variable_NN.py --iternum 1000 --batch 5000 --resample_steps n --resample_every N

@Luuk-Renden Luuk-Renden added the enhancement New feature or request label Jun 8, 2023
@Luuk-Renden Luuk-Renden self-assigned this Jun 8, 2023
@Luuk-Renden
Copy link
Contributor Author

Has been added as described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant