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

lfp Weibull Fit not working #50

Open
leester1690 opened this issue Oct 23, 2024 · 0 comments
Open

lfp Weibull Fit not working #50

leester1690 opened this issue Oct 23, 2024 · 0 comments

Comments

@leester1690
Copy link

I tried the following Weibull Fit with example from the User Guide (surpyval-readthedocs-io-en-latest.pdf). I get a completely different output. Model parameters are different. I expect the parameters shown in the User Guide are correct, given that lfp=True in the fit constructor.

Why the discrepancy? Note: I'm using v0.10.1, latest stable release.

Code:
import surpyval as surv
f = [.1, .1, .15, .6, .8, .8, 1.2, 2.5, 3., 4., 4., 6., 10., 10.,
12.5, 20., 20., 43., 43., 48., 48., 54., 74., 84., 94., 168., 263., 593.]
s = [1370.] * 4128
x, c, n = surv.fs_to_xcn(f, s)
model = surv.Weibull.fit(x, c, n, lfp=True)
print(model)
model.plot()

User Guide output:
Parametric SurPyval Model

Distribution : Weibull
Fitted by : MLE
Max Proportion (p) : 0.006744450944727198
Parameters :
alpha: 28.367193779799038
beta: 0.4959762140288241

My Output
Precision was lost, try:

  • Using alternate fitting method
  • visually checking model fit
  • change data to be closer to 1.
    Parametric SurPyval Model
    =========================
    Distribution : Weibull
    Fitted by : MLE
    Max Proportion (p) : 0.982053236083039
    Parameters :
    alpha: 94757062081178.73
    beta: 0.19946444457267584
    94757062081178.73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant