Skip to content

Commit

Permalink
modified: datasets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragnagpal committed Mar 29, 2022
1 parent c190832 commit e46028a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion auton_survival/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@

import torchvision

def increase_censoring(e, t, p):
def increase_censoring(e, t, p, random_seed=0):

np.random.seed(random_seed)

uncens = np.where(e == 1)[0]
mask = np.random.choice([False, True], len(uncens), p=[1-p, p])
Expand Down

0 comments on commit e46028a

Please sign in to comment.