summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Laboissière <rafael@debian.org>2024-03-09 03:00:06 -0300
committerRafael Laboissière <rafael@debian.org>2024-03-09 03:00:06 -0300
commit8557e3e729e345e2e785c959dd92b46aa40a395d (patch)
tree9d86c1e597adb4d5cb527fad46bb13aac52e42c0
parenta642daab2db32f52c67b97d62fbeedde751358ac (diff)
Make the BIST for glmfit reproducible
Forwarded: https://github.com/gnu-octave/statistics/pull/139 Last-Update: 2024-03-08 Gbp-Pq: Name glmfit-reproducible-bist.patch
-rw-r--r--inst/glmfit.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/inst/glmfit.m b/inst/glmfit.m
index 2e5b819..75b6d32 100644
--- a/inst/glmfit.m
+++ b/inst/glmfit.m
@@ -133,6 +133,7 @@ endfunction
%! X = rand (50, 1);
%! b_true = [0.4; 1.5];
%! mu_true = exp (b_true(1) + b_true(2) * X);
+%! randp ("seed", 1);
%! y = poissrnd (mu_true);
%! b = glmfit(X, y, "poisson", "link", "log");
%! assert(b(1), b_true(1), 0.5);