You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In similar spirit to #1 I have my own package (originally just hobby code to learn Julia, pls don't judge too harsh) for survival analysis. As @ararslan and I discussed on Slack I don't want to be 'competing' or causing duplicative code to be written so just wanted to open this issue to see if there are any parts I can merge in or if I should just archive it/keep for hobby code only.
Surv - Generic survival object for left, right, or interval censoring so far. Has fields for pulling out key stats (e.g. risk sets, event times, etc.)
WIP code for parametric PH models
My future plans were going to be:
CoxPH
Parameter PH and AFT (again with Distributions.jl for parametrisations)
Transformers between distribution, ranking, and linear predictor predictions
My plan was then to hook this up between Turing.jl and mlr3proba for cross-language probabilistic ML in R.
If useful happy to go into detail about features/methods but won't for now.
I was curious about some comparisons, these might be of interest:
Kaplan-Meier is 100x faster than R (as expected) and same results:
using RCall
using Random: seed!
using Distributions
using BenchmarkTools
using Survival
seed!(1)
n =1000
T =round.(rand(Uniform(1, 10), n));
Δ =rand(Binomial(), n) .==1;
surv =Surv(T, Δ, "right");
R" library(survival) time = $T status = $Δ surv = Surv(time, status)";
@benchmarkR" km = survfit(surv ~ 1)"
julia>@benchmarkR" km = survfit(surv ~ 1)"
BenchmarkTools.Trial:6946 samples with 1 evaluation.
Range (min … max):599.208 μs …67.817 ms ┊ GC (min … max):0.00%…0.00%
Time (median):625.708 μs ┊ GC (median):0.00%
Time (mean ± σ):718.383 μs ±1.690 ms ┊ GC (mean ± σ):0.00%±0.00%
█▇▅▃▂▁▁ ▁
████████▇▇▇▆▆▅▅▆▄▄▄▄▄▅▁▁▃▄▄▃▃▃▄▁▁▄▁▁▁▁▁▃▄▁▁▃▃▃▁▁▁▁▃▃▃▃▁▁▃▁▁▃ █
599 μs Histogram:log(frequency) by time 2.26 ms <
Memory estimate:1.12 KiB, allocs estimate:41.
julia>@benchmarkkaplan(surv)
BenchmarkTools.Trial:10000 samples with 5 evaluations.
Range (min … max):6.067 μs …619.550 μs ┊ GC (min … max):0.00%…97.93%
Time (median):6.308 μs ┊ GC (median):0.00%
Time (mean ± σ):6.881 μs ±14.405 μs ┊ GC (mean ± σ):6.14%±2.92%
██▁
▂▅▆▆███▆▃▃▃▃▄▄▄▃▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
6.07 μs Histogram: frequency by time 8.47 μs <
Memory estimate:8.03 KiB, allocs estimate:151.
Competitive speeds against this package (mainly due to design decisions to slow creation of Surv object in favour of generating stats up front) - very interested in hearing opinions on this
In similar spirit to #1 I have my own package (originally just hobby code to learn Julia, pls don't judge too harsh) for survival analysis. As @ararslan and I discussed on Slack I don't want to be 'competing' or causing duplicative code to be written so just wanted to open this issue to see if there are any parts I can merge in or if I should just archive it/keep for hobby code only.
So far I have:
My future plans were going to be:
My plan was then to hook this up between Turing.jl and mlr3proba for cross-language probabilistic ML in R.
If useful happy to go into detail about features/methods but won't for now.
I was curious about some comparisons, these might be of interest:
The text was updated successfully, but these errors were encountered: