Skip to content

Commit

Permalink
[compare_dtrj_lifetime_methods.py]: Fix Kaplan-Meier Fits
Browse files Browse the repository at this point in the history
The Weibull and Burr fits did not fit the Kaplan-Meier survival function
but the autocorrelation function (remain probability).
  • Loading branch information
andthum committed Apr 16, 2024
1 parent 740a8a8 commit 7e4fece
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,6 @@ def get_ydata_min_max(ax):
print("\n")
print("Calculating lifetimes from the Kaplan-Meier estimator...")
timer = datetime.now()
# TODO
# Read Kaplan-Meier survival functions from file.
km_surv_funcs, km_surv_funcs_var, times, _states = read_sf_from_file(
args.INFILE_KM,
Expand All @@ -1505,7 +1504,7 @@ def get_ydata_min_max(ax):
popt_km_wbl,
perr_km_wbl,
) = weibull_fit_method(
remain_probs,
km_surv_funcs,
times,
fit_start=fit_start_km,
fit_stop=fit_stop_km,
Expand All @@ -1524,7 +1523,7 @@ def get_ydata_min_max(ax):
popt_conv_km_brr,
perr_conv_km_brr,
) = burr12_fit_method(
remain_probs,
km_surv_funcs,
times,
fit_start=fit_start_km,
fit_stop=fit_stop_km,
Expand Down

0 comments on commit 7e4fece

Please sign in to comment.