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 initial/mean point to chains to fix #243 #249

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions espei/optimizers/opt_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def initialize_new_chains(params, chains_per_parameter, std_deviation, determini
# apply a Gaussian random to each parameter with std dev of std_deviation*parameter
tiled_parameters = np.tile(params, (nchains, 1))
chains = rng.normal(tiled_parameters, np.abs(tiled_parameters * std_deviation))
chains[0] = params #Ensure the initial guess is always included in the set, as the std_deviation may be too large to generate feasible points around a "good" initial point.
return chains

@staticmethod
Expand Down
Loading