You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
I looked at dirichlet_sample script file under FullBNT-1.0.7\bnt\KPMstats, and
written like No.2. I wonder both code No.2 is wrong, and it should be changed
like codes in No.1. Or both of the case are correct?
Could you please clarify on this.
No.1)
alpha = [1/3 1/3 1/3]; % gamma distribution shape parameter (vector)
scale = [1 1 1]; % gamma distribution scale parameter
CPT = zeros(N, k); % conditional prob. table: 4 x 3 -> P(F(3) | H(2),I(2))
for j=1:N
CPT(j,:) = gamrnd(alpha, scale, 1, k); % generate N x 1 Gamma random numbers with shape(=alpha)/scale parameters
end
No.2)
alpha = [1/3 1/3 1/3]; % gamma distribution shape parameter (vector)
scale = [1 1 1]; % gamma distribution scale parameter
CPT = zeros(N, k); % conditional prob. table: 4 x 3 -> P(F(3) | H(2),I(2))
for j=1:k
CPT(:,j) = gamrnd(alpha(j), scale(j), N, 1); % generate N x 1 Gamma random numbers with shape(=alpha)/scale parameters
end
What is the expected output? What do you see instead?
it seems that both of the output on the code above look correct.
What version of the product are you using? On what operating system?
FullBNT-1.0.7, Matlab2014b, Windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected] on 11 Jan 2015 at 1:09
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 11 Jan 2015 at 1:09The text was updated successfully, but these errors were encountered: