auton-survival
auton-survival copied to clipboard
Age feature in pbc2
Hi,
In datasets.py, are you making age
a dynamic covariate, instead of just using the initial value?
In that case, https://github.com/autonlab/auton-survival/blob/5dde465f7223601717abddc1d075e837707c403b/auton_survival/datasets.py#L132
should change to
age = data['age'] + data['year']
years
is the time of the event. year
is the time indicator.
Here are some results:
Current:
In: x, t, e = datasets.load_dataset('PBC', sequential = True)
In: x[0][0][-1]
Out: 59.86200854232829
In: x[0][1][-1]
Out: 59.86200854232829
After the proposed change:
In: x, t, e = datasets.load_dataset('PBC', sequential = True)
In: x[0][0][-1]
Out: 58.7668382433468
In: x[0][1][-1]
Out: 59.29251998685791
I have tested this on the DeepSurvivalMachine package, but I believe this package uses the same module for loading datasets. I can redo these tests, and do a pull request if needed.
Hi Ayush 👋🏼 thanks for contributing to auton-survival 🙂 If you'd like to open a PR, that would be great.