Opened 14 years ago
Last modified 14 years ago
#979 assigned defect
Error in first sample in GibbsRectangleMNormal
Reported by: | César Pérez Álvarez | Owned by: | Jorge |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Math | Version: | 2.0.1 |
Severity: | minor | Keywords: | b44 |
Cc: |
Description
If we compile this code several times:
Matrix mu = Col(0.0);
Matrix cov = Col(1);
Matrix c1 = Col(-1/0);
Matrix c2 = Col(1/0);
Matrix MCsample = GibbsRectangleMNormal(mu, cov, c1, c2, 1, 1);
Always sample value is -8.29131843138. If we try with this code
Matrix mu = Col(0.0);
Matrix cov = Col(1);
Matrix c1 = Col(-1/0);
Matrix c2 = Col(1/0);
Matrix MCsample = GibbsRectangleMNormal(mu, cov, c1, c2, 1, 100);
And the first sample, that we get, is the upper value. I think that problem is the limits (-inf, +inf). If we try with others value not +/-inf the sampling works well.
If we calculate the probabability density without this value, this density is the expected one N(0,1).
Change History (1)
comment:1 Changed 14 years ago by
Owner: | changed from Víctor de Buen Remiro to Jorge |
---|---|
Status: | new → assigned |