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

Mixture Models #40

Open
subha000git opened this issue Feb 27, 2024 · 0 comments
Open

Mixture Models #40

subha000git opened this issue Feb 27, 2024 · 0 comments

Comments

@subha000git
Copy link

subha000git commented Feb 27, 2024

Hi,
I find this python package very helpful for analyzing weibull data. However, I found the documentation on "Mixture models" could be more elaborate.
I was using the following example:

import surpyval as surv
import numpy as np
from matplotlib import pyplot as plt

x = [1, 2, 3, 4, 5, 6, 6, 7, 8, 10, 13, 15, 16, 17 ,17, 18, 19]
x_ = np.linspace(np.min(x), np.max(x))

model = surv.Weibull.fit(x)
wmm = surv.MixtureModel(x=x, dist=surv.Weibull, m=2)

model.plot(plot_bounds=False)
plt.plot(x_, wmm.ff(x_))

However,
(1)I could not understand what is the percentage of data (or which data points) being assigned to first weibull distribution and what is the percentage of the data assigned to the 2nd one? The wmm.params gives me the paramers, but it does not give corresponding fraction of data from which it calculated. How do we get the individual weibull data for each distribution? It seems the code currently just splits the entire data set into 2 equal arrays for weibull fitting.
(2) How do we get the statistics of the fitting for each weibull (Goodness of fit)? How do we know if it is a good fit or bad fit?

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