Skip to content

Commit

Permalink
ppa: fix random seed (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia authored Feb 18, 2025
1 parent 5688279 commit f21909f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion preliz/predictive/ppa.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,11 @@ def initialize_subsamples(self, target):

self.shown.update(shown_list)

rng = np.random.default_rng(235)
# If we have not seen all the samples yet, we collect more
if len(self.shown) != self.draws:
if target is None:
new = np.random.choice(list(set(range(0, len(self.pp_octiles))) - self.shown))
new = rng.choice(list(set(range(0, len(self.pp_octiles))) - self.shown))
pp_idxs_to_display.append(new)

for _ in range(8):
Expand Down

0 comments on commit f21909f

Please sign in to comment.