Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix the proposal distribution of the MH algorithm to stop picking at the bounds. #5

Open
trieger1 opened this issue Jan 3, 2020 · 1 comment
Assignees
Milestone

Comments

@trieger1
Copy link
Collaborator

trieger1 commented Jan 3, 2020

The proposal distribution of the M-H algorithm is probably incorrect as-is. I suggest changing this line in mh_generate_pps:

q = max(p_bnds(:,1),min(p_bnds(:,2),p + (p_bnds(:,2)-p_bnds(:,1))/10.*(2*rand(num_p,1)-1)));

to:

for ii = 1:numel(q0)
    q(ii) = icdf(truncate(makedist('Normal', 'mu', p(ii), 'sigma', sigma_proposal), 0, 1), rand());
end

where sigma_proposal is some pre-defined width of the proposal distribution and we assume every parameter runs 0 --> 1 (LB & UB stored somewhere else).

@trieger1 trieger1 self-assigned this Jan 3, 2020
@trieger1 trieger1 added this to the v2.0 milestone Jan 3, 2020
@trieger1
Copy link
Collaborator Author

Note: the icdf function requires a proprietary toolbox.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant