lifelines icon indicating copy to clipboard operation
lifelines copied to clipboard

alpha property of KaplanMeierFitter object does not reflect value passed at initialization.

Open TristanBoudreault opened this issue 4 years ago • 2 comments

.alpha property of KaplanMeierFitter object does not reflect value passed at initialization.

Steps to reproduce

import lifelines
print(lifelines.__version__) # out: '0.25.7'

kmf = KaplanMeierFitter()
kmf.fit([1], [True], alpha=0.9) #notice alpha is not the default 0.05
kmf.alpha #out: 0.05
# expected output 0.9

Screenshot from mode analytics notebook image

TristanBoudreault avatar Mar 19 '21 15:03 TristanBoudreault

The code is actually behaving as expected. In the example above, the value passed in the alpha argument to the fit() method is scoped only to the method.

TristanBoudreault avatar Mar 19 '21 18:03 TristanBoudreault

👋 @TristanBoudreault

okie! But clearly this behaviour is poorly documented, so I'm going to reopen this issue with a docs tag.

CamDavidsonPilon avatar Mar 19 '21 18:03 CamDavidsonPilon