Skip to content

Age feature in pbc2 #130

@ayushpatnaikgit

Description

@ayushpatnaikgit

Hi,
In datasets.py, are you making age a dynamic covariate, instead of just using the initial value?

In that case,

age = data['age'] + data['years']

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions