Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restriction for unique.death.times #410

Closed
nblaffey opened this issue May 30, 2019 · 3 comments · Fixed by #700
Closed

Add restriction for unique.death.times #410

nblaffey opened this issue May 30, 2019 · 3 comments · Fixed by #700
Labels

Comments

@nblaffey
Copy link

Would it be possible to add functionality to restrict the number of unique.death.times used? I am working with a data set with a very large number of unique death times, and considering matrices are calculated showing the survival and CHF at each time index for every observation it really slows down computation and increases memory usage. Randomforestsrc has a "ntime" variable that will calculate the survival probability for only a subset of the actual unique death times, would it be possible to implement this in ranger or are there any workarounds?

@mnwright
Copy link
Member

mnwright commented Jun 3, 2019

Related to #202 (comment).

I think we should add the option. It would also be nice to specify the exact time points to use.

Workaround: Manually restrict the time points in the data. You could check the code of RFSRC to see what exactly they do.

@mnwright
Copy link
Member

Btw., RFSRC is using (see https://github.com/kogalur/randomForestSRC/blob/fefe2aa44a184f522136079b1419163f67fb6cd6/src/main/resources/cran/R/utilities.survival.R#L95-L98)

time.interest <- time.interest[unique(round(seq.int(1, length(time.interest), length.out = ntime)))]

where time.interest are sorted unique event times and ntime is the number of timepoints to use (default 150). Any they also allow the user to specify the time points to be used.

@mnwright
Copy link
Member

mnwright commented Nov 7, 2023

Done in #700.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants