Cumulative plot with show_censors option
See original GitHub issueWhen I use KaplanMeierFitter.plot_cumulative_density with show_censors=True, I got AttributeError: ‘PlotEstimateConfig’ object has no attribute ‘predict_at_times’.
I modified the end of plotting.py from
else:
self.estimate_ = estimate
self.confidence_interval_ = kwargs.pop("confidence_intervals")
to
else:
self.estimate_ = estimate
self.confidence_interval_ = kwargs.pop("confidence_intervals")
self.predict_at_times = cls.cumulative_density_at_times
I successfully got my cumulative plot. But I think the code should be changed more correct way.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Using histograms to plot a cumulative distribution - Matplotlib
This shows how to plot a cumulative, normalized histogram as a step function in order ... A couple of other options to the...
Read more >More examples and recipes — lifelines 0.27.4 documentation
Plotting options and styles¶ ; Standard¶ · = KaplanMeierFitter ; Show censors and edit markers¶ ·.fit ; Hide confidence intervals¶ ·.fit ; Displaying...
Read more >cumulative distribution plots python - Stack Overflow
I am doing a project using python where I have two arrays of data. Let's call them pc and pnc. I am required...
Read more >Plot Cumulative Distribution Function in R - GeeksforGeeks
In this article, we will discuss how to plot a cumulative distribution function (CDF) in the R programming Language.
Read more >Creating a Cumulative Distribution Plot - SAS Help Center
The following statements use the NORMAL option to display a fitted normal distribution function on a CDF plot of breaking strengths:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Cameron, your solution fixed the error in version 0.23.9. I really appreciate your prompt response, and giving us this great library for lifetime data analysis!
@tsjshg a better solution, and the one I’ll implement, is to change the following:
So your entire script becomes: